There are several different Pocket PCs and now Pocket PC 2002 out there. If your application needs to detect what device it is running on, you can use the following lines of code.
Applies to: Microsoft Windows Powered Pocket PC 2000 Microsoft Windows Powered Pocket PC 2002
WCHAR wszMachineName[128]; SystemParametersInfo(SPI_GETOEMINFO, sizeof(wszMachineName), &wszMachineName, 0);
The definition of "SPI_GETOEMINFO" is located in the "winuser.h" include file. The OEM that created your Pocket PC can freely define the string that will be returned in "wszMachineName." This is the reason why the strings look so different from one Pocket PC to another. Here are the return values for the Pocket PCs currently available:
Here is a sample WinMain that implements the call:
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. WCHAR wszMachineName[128]; SystemParametersInfo(SPI_GETOEMINFO, sizeof(wszMachineName), &wszMachineName, 0); WCHAR tst[500]; wsprintf(tst,L"<%s>",wszMachineName); MessageBox(NULL,tst,wszMachineName,MB_OK); return 0; }