Is there a way to determine if an application is 32-bit or 64-bit? To be more specific, I want to be able to determine if a 32-bit application is being emulated under WOW64. I'm trying to use the Call Library Function and selecting IsWOW64Process from the Kernel32.dll, but I can't seem to get it to work. I think I may be setting it up wrong. I'm using a constructor node and invoke node for Process and after calling GetProcesses in the invoke node I'm sending that into a For Loop to inspect each process seperately. Inside the For Loop is where I'm trying to use the Call Library Function. From what I've read IsWOW64Process has a Handle as an input and a pointer to a boolean as an output. I may be incorrect in this as I've seen multiple varieties of this call on the internet. I've tried setting this up but I can't seem to get it to work. I'm looking for help on how to correctly use the Call Library Function or if anyone knows a better way to do this I'm open to suggestions. Thank you for any help.
Solved! Go to Solution.
The examples you saw were probable .NET examples that used the kernel32 DLL as an unmanaged call. I'm not quite sure if the same thing will work in LabVIEW. What does your code look like? Can you post it.
Also, be aware that IsWOW64 will not tell you if an application is 32-bit or 64-bit. It only tells you if it's running in emulation mode. A 32-bit app running on a 32-bit OS will tell you False, just like a 64-bit app running on a 64-bit OS.
Yes, I'm aware. That's all I really need to know. I should have phrased the question better. All I need is to determine is if the application is being emulated on a 64-bit OS. This code will only ever be run on a 64-bit machine. I only need the True or False output for a Case Structure that will determine what to do next in the software. I'll try and get the code posted, but its just a simple .NET setup with a constructor node, invoke node, and property nodes. You are also correct smercurio_fc, I have been looking at the .NET examples. I've run out of ideas on where to look so I went to the source, the MSDN Library.
I've got a link you might want to check out to make sure that your call function is correct.
I would also recommend that you check out DLL.VI example in example finder.
Example Finder > Communicating with External Applications > Using External Code> Integrating DLLs > Call DLL.vi
Hope this helps,
Thank you for the advice Josh. The link you sent me was actually where I got the idea for what I'm trying to do. I figured out how to determine if an application is being emulated this morning after some more research and trial and error. I ended up figuring it out on my own, but I do appreciate everyone that tried to help.
Are you just trying to determine if the application is running 32 bit or 64 bit LabVIEW? If so, see this link.
How to Programmatically Determine if a VI is Running on 32-bit or 64-bit LabVIEW
If not, could you give me some information on what it is you're trying to do?
I don't want to check if a VI is 32 or 64 Bit. I want to check if a process on the PC is 32 or 64 Bit.
I use the "GetProcessByName" to get (for example) "firefox.exe" and now I want to know if Firefox is a 32 or 64 Bit program.
Can you give a little more information about what isn't working in LabVIEW 2014? Are you gettitng a specific error code? Have you tried running the above snippet, or some version of a VI that calls the IsWOW64Process function?
I assume you are trying to do this all programmatically. If you aren't trying to determine it at runtime, you can look in tehe Process explorer, referenced here:
Hope this helps!