12-02-2010 10:27 AM
Good day.
Function GetWinOSVersion (&temp_int, &temp_int2, NULL, NULL); - get 2 numerals, and his text adding = OS type. Now i know that types.
/Windows 7.
if (temp_int=6 && temp_int2==1) winver=61;
//Windows 7 x64.
if (temp_int=6 && temp_int2==2) winver=62;
//Windows XP.
if (temp_int=5 && temp_int2==1) winver=51;
//Windows XP x64.
if (temp_int=5 && temp_int2==2) winver=52;
//Windows Vista.
if (temp_int==6 && temp_int2==0) winver=60;
//Windows 2000
if (temp_int==5 && temp_int2==0) winver=50;
What numerals i missed (how to be win98, ME, NT, mac os, linux Os)?
12-02-2010 11:14 AM
Recent versions of CVI don't run on anything earlier than Windows 2000 SP3, certainly not on Mac OS, and I doubt this function works on CVI for Linux.
However, if you are usng an old version of CVI then:
Win95: Major=4, Minor=0
Win98: Major=4, Minor=10, Build=1998
Win98SE: Major=4, Minor=10, Build=2222
WinMe: Major=4, Minor=90 (unless your executable is called setup.exe or launch.exe, when it pretends to be Win98)
NT 3.51: Major=3, Minor=51
NT 4: Major=4, Minor=0, Build=1381
12-02-2010 12:12 PM
There's more info on Windows OS versions here:
http://msdn.microsoft.com/en-us/library/ms724832(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms724429(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx
and older version info here
http://www.codeproject.com/kb/system/winvertable.aspx
http://forums.ni.com/t5/LabWindows-CVI/GetWinOSVersion/m-p/217380