forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Recognition of 64 bit system

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Wed Nov 24, 2010 1:12 pm    Post subject: Recognition of 64 bit system Reply with quote

How can I apply IsWow64Process in my Fortran program?

Erwin
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Thu Nov 25, 2010 9:49 am    Post subject: Reply with quote

The function takes the form

Code:
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....
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Nov 25, 2010 1:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Thu Nov 25, 2010 7:06 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group