// This new version, using the revised data structure, fixed the problem with the WM5.0 devices. public static CEOSVERSIONINFO GetOSInfo(RAPI rapi) { CEOSVERSIONINFO verInfo = new CEOSVERSIONINFO(); CeGetVersionEx(ref verInfo); return(verInfo); }
// Note: This is called from 'DataXfer.AskToInstall' public void DisplayDeviceInfo(RAPI rapi, CEOSVERSIONINFO verInfo) { string txt; txt = verInfo.dwPlatformId.ToString(); if (txt.IndexOf("PLATFORM") != -1) { txt = txt.Substring(txt.IndexOf("PLATFORM") + 8); if (txt.IndexOf("_") != -1) { txt = txt.Substring(txt.IndexOf("_") + 1); } } labelPlatform.Text = txt; txt = verInfo.dwMajorVersion + "." + verInfo.dwMinorVersion + "." + verInfo.dwBuildNumber; labelOSVersion.Text = txt; SYSTEM_INFO sysInfo = new SYSTEM_INFO(); rapi.GetDeviceSystemInfo(out sysInfo); txt = sysInfo.dwProcessorType.ToString(); if (txt.IndexOf("PROCESSOR") != -1) { txt = txt.Substring(txt.IndexOf("PROCESSOR") + 9); if (txt.IndexOf("_") != -1) { txt = txt.Substring(txt.IndexOf("_") + 1); } } labelProcessor.Text = txt; }
internal static extern int CeGetVersionEx(ref CEOSVERSIONINFO lpVersionInformation);