Pocket PC Emulation

Hi,

I am busy on a C++ mobile project at the moment.

To test my changes I currently compile the program, copy it to the memory card, test it on the device, if there's still a problem, repeat the process.

This is obviously time consuming and I am unable to step through the code so have to put message boxes in.

I see that there is an option to compile for Pocket PC 2002 Emulation. I am not sure what to do with this though? Any other ideas go get this to run on the laptop?


Thanks a lot,
DaveD

(Using C++ Embedded 3.0 - device is running Windows CE)
I've been coding Win CE about 10 years, and I don't use emulators much. Actually, just the other day I was experimenting with using them for Windows Mobile using Visual Studio 2008 Pro, and they seem to work pretty good there, although a bit slow.

eMbedded Visual C++ 3.0 is ancient. Version 4.0 has even been out for a long time.

Anyway, what I do is open a debug output file which I output variables to. It is slower than developing for the desktop, but not by much. You'll get fast at copying the files back and forth. Here is some example code from one of my major Win CE projects that shows the technique...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
long fnWndProc_OnCreate(lpWEA wea)        //this is pretty much where it all starts.
{
 TCHAR szSetup[256],szClassName[16],szTmp[16];
 MAINWINDOWDATA* pMainWindowData;
 INITCOMMONCONTROLSEX icx;
 unsigned int iReturn=0;
 HINSTANCE hInstance;
 HWND hWnd,hEdit;
 HANDLE hHeap;
 WNDCLASS wc;
 GridData gd;
 FILE* fp1;
 RECT rc;
 
 #if defined(MYDEBUG)
 fp=_tfopen(_T("\\C_DRIVE\\Silvah\\Output.txt"),_T("w"));
 _ftprintf(fp,_T("Output.txt Opened During fnWndProc_OnCreate()\n"));
 _ftprintf(fp,_T("MYDEBUG Is Defined!\n"));
 #endif
 
 //Get hInstance
 wea->hInst=((LPCREATESTRUCT)wea->lParam)->hInstance;
 hInstance=LoadLibrary(_T("dllSilvd.dll"));
 
 //Set up pMainWindowData
 hHeap=GetProcessHeap();
 pMainWindowData=(MAINWINDOWDATA*)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(MAINWINDOWDATA));
 if(pMainWindowData)
 {
    memset(pMainWindowData,NULL,sizeof(MAINWINDOWDATA));
    SetWindowLong(wea->hwnd,0,(long)pMainWindowData);
    pMainWindowData->hMainWnd=wea->hwnd;
    #if defined(MYDEBUG)
        _ftprintf(fp,_T("pMainWindowData=%u\r\n"),pMainWindowData);
    #endif
    .....
    .....
    .....

 }
 hWnd=CreateWindow(_T("button"),_T("Reg"),WS_CHILD|WS_VISIBLE,280,176,36,18,wea->hwnd,(HMENU)IDC_REGEN,wea->hInst,0);
 hWnd=CreateWindow(_T("button"),_T("Gps"),WS_CHILD|WS_VISIBLE,280,196,36,18,wea->hwnd,(HMENU)IDC_GPS,wea->hInst,0);
 hWnd=CreateWindow(_T("button"),_T("Pre. Plt"),WS_CHILD|WS_VISIBLE,210,176,60,18,wea->hwnd,(HMENU)IDC_PREVIOUS,wea->hInst,0);
 hWnd=CreateWindow(_T("button"),_T("Next Plt"),WS_CHILD|WS_VISIBLE,210,196,60,18,wea->hwnd,(HMENU)IDC_NEXT,wea->hInst,0);
 #if defined(MYDEBUG)
     _ftprintf(fp,_T("Leaving fnWndProc_OnCreate()\n\n"));
 #endif

 return 0;
}
Topic archived. No new replies allowed.