All Forums
 Microsoft Windows CE
 General CE
 Determining Build Number Programmatically
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 02 Oct 2003 :  17:01:15  Show Profile  Email Poster
Q: How can I determine my CE build number programmatically?

The ADS CE Build number is stored in the device registry. Below is an example for reading it on the BitsyX. For other platforms you will have to change the key name that you open in the call to RegOpenKeyEx.


HKEY key;
DWORD size = 0;
TCHAR *value;

// open the key
RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("\\Platform\\BITSYX"), 0, 0, &key);

// determine the length of the value
RegQueryValueEx(key, _T("ADSCEVersion"), 0, NULL, NULL, &size);

// allocate a buffer
value = new TCHAR[size];

// get value
RegQueryValueEx(key, _T("ADSCEVersion"), 0, NULL, (BYTE*)value, &size);

RETAILMSG(1, (_T("ADS CE Build number: %s\r\n"), value));

// free the buffer
delete value;

// close the reg key
RegCloseKey(key);
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000