PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Fri Nov 05, 2010 12:15 am Post subject: |
|
|
This is code vdsalchemist posted awhile back. You use the IsWow64Process to determine if your 32bit application is runing under WOW64 (on a 64-bit OS)
msdn: http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx
| Code: |
#-----------------------------------------------------------------------------#
# #
# A function that determines if you are using a 64bit version of windows. #
# #
# Author: Johnny Kinsey #
# #
# Copyright: Copyright © 2007 DragonSphere Software #
# #
#-----------------------------------------------------------------------------#
#DEFINE FUNCTION,WIN64
If @Win64()
Info Your are using a 64bit version of Windows
Else
Info You are using a 32bit version of Windows.
End
Stop
:WIN64
%R =
%%MajorVersion = @SubStr(@SysInfo(WinVer),1,1)
If @Greater(%%MajorVersion,4)
LoadLib kernel32.dll
%B = @BINARY(DWORD,0)
%H = @lib(kernel32,GetCurrentProcess,INT:)
%A = @lib(kernel32,IsWow64Process,BOOL,INT:%H,INT:@addr("%B"))
%B = @val(@substr(%B,1,4))
If @Equal(%B,1)
%R = 1
End
FreeLib kernel32
End
Exit %R
|
|
|