When developing a Windows CE application, it is often necessary to detect the platform type to see if our application is running on the pocket PC, smartphone, or Windows CE. In this article, we describe how to write an application to detect the currently running platform type.
When developing a Windows CE operating system, we encounter another situation where some applications limit the operating system platform that is running, such as allowing only the Pocket PC to run. And if we want to run on Windows CE, we need to modify the operating system's platform type. Note: This situation can only occur when testing, should not modify the actual product platform type, otherwise it will cause a lot of security problems.
To create a platform detection program
First, we need to create an application to detect the current platform type, and we use C + + and Platform Builder to create this program. If you are familiar with the development of the. NET Compact framework and want to develop a hosted platform detection program, please refer to:
How to detect if your application is running on an emulator
Http://blogs.msdn.com/netcfteam/archive/2006/09/15/756755.aspx
Detect your program running on a Pocket PC or Smartphone
Http://blogs.msdn.com/netcfteam/archive/2006/09/22/766343.aspx
Detect whether the platform supports touch screen
http://blogs.msdn.com/netcfteam/archive/2006/10/02/platform-detection-iii_3a00_- How-to-detect-a-touch-screen-on-windows-ce-in-.net-cf.aspx
The process of creating OS design and compilation is skipped here, referring to the "Windows CE 6.0 R2 development experience." We first create a subproject (Subporject) in Platform Builder, locate the Subporject node in Solution Explorer, right-click the Add New Porject, and start the wizard.
In the wizard, select WCE Application to change the project name to "Checkplatform".