Operating System Version Information

The function GetVersionEx can be used to obtain the Windows CE operating system version your application is running on. The function takes a single argument that is a pointer to a OSVERSIONINFO structure in which the version information is returned. The code in Listing 13.1 calls GetVersionEx and displays the contents of the OSVERSIONINFO structure.

Listing 13.1. Obtaining operating system version information
 void Listing13_1() { OSVERSIONINFO osVersion; osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if(!GetVersionEx(&osVersion)) cout ≪ _T("Could not get version information") ≪ endl; else { cout ≪ _T("Major Version:") ≪ osVersion.dwMajorVersion ≪ endl; cout ≪ _T("Minor Version:") ≪ osVersion.dwMinorVersion ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.