|
GM Fisher -> RE: will eVB apps work on Pocket PC 2003 devices? (8/2/2003 10:17:22 PM)
|
I have now (I think) successfully updated my program to work properly on new OS, and tested it on a new Machine. In doing so I read a lot of material about new OS, searched forums for solutions etc…. and found that there is very little information out there at the moment. To get the ball rolling I found the following issues and work arounds for my program when run under PocketPC 2003:- HTML Control ============ The new OS treats the control as part of a processing thread specific for the Form from which it was created (Hwnd). If called from another Form code will continue executing prior to completion of the rendering of control, or running of script within the control. This is OK if you are using the control to display text etc, however if you are using it as a ‘Scripting Interface’, then the processing thread will return prior to the script having completed its execution. Solution - Control needs now to be ‘Form Specific’. That is a child of the Form from which it is to be called, and not a ‘Child’ of a separate Form. Another solution may be to simulate a call back interface using the timer control to check for completion of execution of script. Multiple Instances of eVB Program running ========================================= Under the new OS multiple instances of program will run if the user repeatedly selects to run it. To overcome this I recompiled my Launch program, written in evC++, (based upon information obtained elsewhere in DEBUZZ forums) to check if program is already running prior to executing another instance. example of new evC++ code is as follows:- #include " stdafx.h" int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SHELLEXECUTEINFO sei; TCHAR commnad_line[255]; HWND hWnd; hWnd = FindWindow(NULL,_T(" MyProgramâ€)); // Put your vb programs Window Caption in place of MyProgram if(hWnd == NULL) { GetModuleFileName(NULL, commnad_line,sizeof(commnad_line)); LPTSTR path_end = _tcsrchr(commnad_line, TEXT(' \\' )); if(path_end != NULL) { _tcscpy(&path_end[1],TEXT(" MyProgram.vb" )); // Put your vb filename in place of MyProgram.vb memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); sei.lpFile = commnad_line; sei.nShow = nCmdShow; if(ShellExecuteEx(&sei) != 0) { return (0); } } return (1); } { ShowWindow(hWnd,SW_SHOWNORMAL); SetForegroundWindow(hWnd); return (0); }} CAB Install =========== I’ve had a number of issues with installation cabs. This is the main one. The eVB Runtimes for the new OS, CE 4.2, are different from prior versions for CE 3.00. I extracted the required dlls for my needs from the Microsoft released runtime set. I find it simplest to create the cab installs for new OS individually from other Processor Type cabs. That is create a separate ‘inf’ file for the new OS version. I found that the following needed to be included in my Pocket PC 2003 version of CAB inf file to ensure correct versions of runtimes installed on different OS versions of PocketPC’s. ;PocketPC 2003 instructions [Version] Signature=" $Chicago$" CESignature=" $Windows CE$" Provider=" Greg" [CEStrings] AppName=" Test Install" InstallDir=" %CE1%\TestProgram" [CEDevice] ProcessorType=2577 PlatformMin=4.0 VersionMin=4.0 VersionMax=4.99 BuildMin=0 BuildMax=0 [SourceDisksNames] 1=,Source1,," [INSTALLDIR]" 2=,Source2,," [WINDOWS]" [SourceDisksFiles] " MyEVBProgram.vb" =1 " MyCICONLaunch.exe" =1 " pvbform2.dll" =2 " MSCEPicture.dll" =2 " MSCEFile.dll" =2 " MSCEComDlg.dll" =2 " pvbhost2.dll" =2 " pvbvbs.dll" =2 " pvbload.exe" =2 " pvbdecl.dll" =2 " MSCEImageList.dll" =2 " MSCEMenuBar.dll" =2 [CopyFiles1] " MyEVBProgram.vb" ,,,0x80000010 " MyIconLaunch.exe" ,,,0x80000010 [CopyFiles2] " pvbform2.dll" ,,,0x80000010 " MSCEPicture.dll" ,,,0x80000010 " MSCEFile.dll" ,,,0x80000010 " MSCEComDlg.dll" ,,,0x80000010 " pvbhost2.dll" ,,,0x80000010 " pvbvbs.dll" ,,,0x80000010 " pvbload.exe" ,,,0x80000010 " pvbdecl.dll" ,,,0x80000010 " MSCEImageList.dll" ,,,0x80000010 " MSCEMenuBar.dll" ,,,0x80000010 [CEShortcuts1] " MyEVBSortCut.lnk" ,0," MyIconLaunch.exe" [DestinationDirs] CopyFiles1=0," %InstallDir%" CopyFiles2=0," %CE2%" CEShortcuts1=0," %CE11%" [DefaultInstall] CopyFiles=CopyFiles1,CopyFiles2 CEShortcuts=CEShortcuts1 [AddRegistry] HKCR," VBCE.ProjectRun\Shell\Open\Command" ," " ,0x00000000," \windows\pvbload.exe %%1" [DefaultInstall] CopyFiles=CopyFiles1,CopyFiles2 AddReg=AddRegistry CESelfRegister=" pvbform2.dll" ," MSCEPicture.dll" ," MSCEFile.dll" ," MSCEComDlg.dll" ," pvbhost2.dll" ," pvbvbs.dll" ," pvbdecl.dll" ," MSCEImageList.dll" ," MSCEMenuBar.dll" The CAB file for the ARM processor pre-2003 OS had to be amended in regards to processor identification to the following :- [CEDevice] ProcessorType=2577 PlatformMin=3.0 VersionMin=3.0 VersionMax=3.0 BuildMin=0 BuildMax=0 This is a long posting, and I’ve covered a number of issues. Hope everyone finds information useful. There are a number of other issues, however I could probably write a book ? Greg http://members.optusnet.com.au/~gm_fisher/
|
|
|
|