Silverfrost Forums

Welcome to our forums

Recognition of 64 bit system

24 Nov 2010 12:12 #7147

How can I apply IsWow64Process in my Fortran program?

Erwin

25 Nov 2010 8:49 #7153

The function takes the form

BOOL WINAPI IsWow64Process(
  __in   HANDLE hProcess,
  __out  PBOOL Wow64Process
);

It resides in kernel32.dll which I guess SLINK will access automatically.

You will be able to see similar functions in win32api.ins. I am guessing that the interface will be something like

STDCALL IsWow64Process 'IsWow64Process'(VAL,REF):LOGICAL*4

You will also need to get hold of the handle of the current process....

25 Nov 2010 12:10 #7155

Paul, See the Microsoft article http://msdn.microsoft.com/en-us/library/ms684139 which states: 'For compatibility with operating systems that do not support this function, call GetProcAddress to detect whether IsWow64Process is implemented in Kernel32.dll. If GetProcAddress succeeds, it is safe to call this function. Otherwise, WOW64 is not present. Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows because the Kernel32.dll in current versions of 32-bit Windows also contains this function.' and give some code in a strange language thet you could no doubt translate. Ian

25 Nov 2010 6:06 #7158

You will need Windows XP with SP2 or a later operating system. If you cannot guarantee this then you will need to call GetProcAddress as you say because the function may not be in the dll.

Please login to reply.