01-25-2016 09:44 AM
Hello everyone,
I use the .net Framework (getProcessesByName) for looking up a process, but now I want to check if that prozess is 32 or 64 Bit.
Has someone an idea?
01-25-2016 09:47 AM
This is most likely a question for a different forum. Is this LabVIEW related?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-25-2016 09:50 AM
Yes, it is,
It is a Labview VI, I thought it would be clear.
01-25-2016 09:52 AM
But what I'm saying is your issue isn't with LabVIEW. You're using the .NET framework which is Microsoft. You can't access the Windows processes through LabVIEW unless you're using the .NET framework as an intermediate language. Have you found a .NET method that does what you're trying to do?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-25-2016 09:59 AM
I got the Code (under this post) from another User and now I want to change the code so I can look that up. I thought that not switching off .net would be the best idea.
01-25-2016 10:15 AM
The Process reference has a lot of Properties that you can access. Maybe one of these can be analyzed to figure out if the process is 64bit or 32bit.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-25-2016 10:19 AM
You should be able to get the IntPtr.Size (the first suggestion) from the Handle property of the process.
01-26-2016 03:02 AM
The IntPtr.Size was a good idea, but it only works with the program itself, so I can check if Labview is a 32 or 64 Bit system but no other programs.
01-26-2016 03:50 AM
There are other suggested methods in that thread, and other linked threads inside it.
Calling IsWow64Process from kernel32.dll from a call library function node would do it.
01-26-2016 07:52 AM - edited 01-26-2016 07:54 AM
@Sam_Sharp wrote:
There are other suggested methods in that thread, and other linked threads inside it.
Calling IsWow64Process from kernel32.dll from a call library function node would do it.
BOOL WINAPI IsWow64Process( _In_ HANDLE hProcess, _Out_ PBOOL Wow64Process );
This function supposedly returns FALSE if the process in question is running natively. That means the only time it is TRUE is if the process is a 32 bit process under Windows 64 Bit. So you would first have to determine if you run under 64 Bit Windows and if so then if this function returns FALSE you have a 64 bit process. Otherwise you always have a 32 bit process.
I'm pretty sure .Net has something along this function as a method of the Process class.