How To Programmatically Distinguish Between Pocket PC Platforms (307488)



The information in this article applies to:

  • Microsoft Windows CE for the Pocket PC

This article was previously published under Q307488

SUMMARY

When you query for the version number of the operating system for Pocket PC and Pocket PC 2002, the result is 3.0 for both platforms. Therefore, an application that needs to distinguish between the two platforms would have to use information other than the version number.

MORE INFORMATION

To determine whether an application is running on Pocket PC or Pocket PC 2002, use the platform type information. When you call SystemParametersInfo with the SPI_GETPLATFORMTYPE action, it returns "Palm PC2" (note the embedded space) for Pocket PC and "PocketPC" for Pocket PC 2002. For example:
TCHAR szPlatform[20];
BOOL bRet = SystemParametersInfo(SPI_GETPLATFORMTYPE,sizeof(szPlatform),szPlatform,0);
if (bRet)
    MessageBox(NULL,szPlatform,L"Platform Type",MB_OK|MB_SETFOREGROUND);
else
    MessageBox(NULL,L"Failed to get platform type",L"Platform Type",MB_OK|MB_SETFOREGROUND);
				

Modification Type:MinorLast Reviewed:8/30/2004
Keywords:kbhowto KB307488