If I'm going to ever talk about writing code on Windows CE, I'll need to get started. Probably the most obvious place to start is WinMain. Wait, that's the desktop's version of WinMain, since I'm writing code on Windows CE, I'll want to look at the Windows CE version of WinMain. Why would CE have a different prototype for WinMain than XP? Well the answer to that is simple: Windows CE uses UNICODE. Most (maybe all?) of the Win32 functions that have ASCII or wide chacarcter variants on XP, only have the wide character variant on CE. This cuts down on the number of entries in coredll, and helps to promote writing international-safe apps.

The prototype for XP's version of WinMain is:

int WINAPI WinMain(
  HINSTANCE hInstance, 
  HINSTANCE hPrevInstance, 
  LPSTR lpCmdLine, 
  int nShowCmd 
); 

The prototype for CE's version of WinMain is:

int WINAPI WinMain(
  HINSTANCE hInstance, 
  HINSTANCE hPrevInstance, 
  LPWSTR lpCmdLine, 
  int nShowCmd 
); 

The only difference is with the lpCmdLine parameter. On CE it's always of type LPWSTR.

Well, that's the first difference I wanted to point out. It's probably obvious to most people, but I think it's a decent place to start.