06-22-2010 02:41 AM
Dear CVI users,
I've got a simple question:
I know that with the "GetWinOSVersion" si possibile to detect on which Win OS the application is running [GetWinOSVersion (&MajorVer, &MinorVer, &Build, &Platform);].
I was wondering if is there a way to detect if the OS is 32 or 64 bit.
thanks in advance.
06-22-2010 02:46 AM
you could try to determine the size of an integer, it should make a difference...
06-22-2010 03:06 AM
I'll make a try... but I'm afraid that the size of an integer is decided at compiler time, not at runtime...
What do you think?
06-22-2010 03:11 AM
yep, you're right... if you have the full CVI version, you could use e.g. the GetNativeSystemInfo function, see here
06-23-2010 08:09 PM
See:
http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx
The code there should get you started on how to determine exactly what OS version you are running on.
Caveats: It uses Windows SDK functions and I have not personally tested it in CVI. Also, the comments below the code indicate that it has some problems. But like I said, it is a start.
06-24-2010 03:39 AM
There's a slightly easier method with example code here.