08-01-2011 01:24 PM - edited 08-01-2011 01:25 PM
I have an LCVI 2009 application that must run on Windows 7. Further, it must be able to tell if the machine is 32-bit or 64-bit. Without resorting to directory name comparisons, is there a way to determine 32-bit or 64-bit?
Thanks
08-01-2011 02:11 PM
Hi Chopper77,
Is your program compiled as 32-bit, 64-bit, or both? 32-bit programs can use IsWow64Process() to determine whether the OS is 32-bit or 64-bit. 64-bit programs already know the answer. If your program is compiled as both 32-bit and 64-bit, use the C preprocessor to determine whether to call IsWow64Process() or not.
Note that not all 32-bit Windows OSes support this IsWow64Process(), so you should use GetProcAddress() instead of importing the symbol at link time.
Brad
08-01-2011 02:13 PM - edited 08-01-2011 02:15 PM
My app is compiled as a 32-bit app.
Is there an LCVI equivalent of IsWow64Process?
08-01-2011 02:33 PM
Hi Chopper77,
I don't know of one, but you can call Windows API functions from LabWindows/CVI applications. You may need to go into the Programs and Features control panel and modify your LabWindows/CVI installation to include support for the Windows SDK.
Brad