This site is no longer active and is available for archival purposes only. Registration and login is disabled.

EasyCE & Simulator Starting Qs


EasyCE & Simulator Starting Qs

Postby Saul » Sep 9, 2002 @ 6:16am

Hey, I'm trying to figure out the how to use EasyCE with the x86 emulator (on W2K). So far I've figured out the following from this site:

Download the GAPI emulator and copy the gx.* files to the Windows directory.

Download a sample windows app (in this case, SampleApp). (I'm working with EasyCE 1.6 at the moment, I ran into too much difficult with the 2.0 version modified for the simulator so I backed off to something easier.)

I've successfully compiled it and run it on my actual iPaQ after some minor difficulties with properly configuring the libraries and such.

However, when I try and run it on the simulator, it produces an illegal memory access error. When I step through the program with the debugger, the problem seems to be that in the function void taskbar (bool)
the code
RECT rc;
GetWindowRect( hWnd, &rc );
HWND hWndTB=FindWindow(TEXT"HHTaskbar"),NULL);

crashes on the second line because hWnd is defined to be 0 and that is protected memory. I realized that hWnd doesn't look to be defined until bool initinstance(HInstance, int) is called a few lines later in WinMain. That is, the WinMain function has the lines:
1: taskbar( false );
2: resettimer();
3: if (!MyRegisterClass(hInstance)) return FALSE;
4: if (!InitInstance (hInstance, nCmdShow)) return FALSE;

and the program crashes in 1 while hWnd isn't defined until 4 when the window is created.

I tried rearranging those lines to
1: resettimer();
2: if (!MyRegisterClass(hInstance)) return FALSE;
3: if (!InitInstance (hInstance, nCmdShow)) return FALSE;
4: taskbar( false );

but then the program crashes in InitInstance on the line hWnd = CreateWindow(wincls, szTitle, WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT, 240, 320, 0, 0, hi, 0); with another illegal exception.

I guess my question is two-fold: Am I completely misreading the problem, and ought the code to work on the emulator? And two, if it doesn't work on the emulator, why does it work fine on my actual iPaq? I know the two aren't identical platforms, but I'm not quite sure what to attribute the problems to.

Thanks ahead of time for any insight.
Saul
pm Member
 
Posts: 1
Joined: Sep 9, 2002 @ 6:03am


Postby goatCE » Sep 9, 2002 @ 6:26am

I sense it now...the onslaught of "take it to the developer forum".
some insight: nobody likes the ppc emulator.
goatCE
pm Member
 
Posts: 202
Joined: Aug 2, 2002 @ 4:57am


EasyCE & Simulator Starting Qs

Postby BurningSheep » Sep 9, 2002 @ 10:20am

Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Return to Windows Mobile


Sort


Forum Description

General Windows Mobile discussion for end-users. Hardware, software, etc. This is also the forum to post your product announcements and other news.

Moderators:

Dan East, sponge, Kevin Gelso, RICoder, Chris Edwards

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron