Microsoft KB Archive/307488

= How To Programmatically Distinguish Between Pocket PC Platforms =

Article ID: 307488

Article Last Modified on 8/30/2004

-

APPLIES TO


 * Microsoft Windows CE Palm-size PC 2.01 software

-



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 &quot;Palm PC2&quot; (note the embedded space) for Pocket PC and &quot;PocketPC&quot; for Pocket PC 2002. For example: TCHAR szPlatform[20]; BOOL bRet = SystemParametersInfo(SPI_GETPLATFORMTYPE,sizeof(szPlatform),szPlatform,0); if (bRet) MessageBox(NULL,szPlatform,L&quot;Platform Type&quot;,MB_OK|MB_SETFOREGROUND); else MessageBox(NULL,L&quot;Failed to get platform type&quot;,L&quot;Platform Type&quot;,MB_OK|MB_SETFOREGROUND);

Keywords: kbhowto KB307488

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.