IsWin64 Bit

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

IsWin64 Bit

Post by bpd2000 »

Code: Select all

// BPD2000
#include "hmg.ch"

Function Main()
       Msginfo(IsWin64(),"IsWin64()" + space(10))
Return

function IsWin64()

Return IF(Len( GetEnv( "ProgramW6432" )) > 0 ,.T.,.F.)

BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: IsWin64 Bit

Post by esgici »

Tested under win32 and worked fine :arrow:

Thanks again Mr. Dave :)

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: IsWin64 Bit

Post by andyglezl »

Gracias !
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: IsWin64 Bit

Post by serge_girard »

To be an official HMG function !

Thanks Dave,

Serge
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: IsWin64 Bit

Post by esgici »

Does someone (including author) tested for Win64 ?

Regards
Viva INTERNATIONAL HMG :D
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: IsWin64 Bit

Post by bpd2000 »

I have tested on WinXP, Win10 with 32 bit OS and 64 bit OS
Any suggestion welcome
Attachments
w1064bitOS.png
w1064bitOS.png (29.08 KiB) Viewed 4200 times
w1032bitOS.png
w1032bitOS.png (20.73 KiB) Viewed 4200 times
winXp32bitOS.PNG
winXp32bitOS.PNG (26.09 KiB) Viewed 4200 times
BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: IsWin64 Bit

Post by esgici »

Hi Mr. Dave
bpd2000 wrote:I have tested on WinXP, Win10 with 32 bit OS and 64 bit OS
Any suggestion welcome
Thanks to detailed test info 8-)

Non essential, but a bit cosmetic proposal :

Code: Select all

Return (! EMPTY( hb_GetEnv( "ProgramW6432" ))) 
Regards :D
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: IsWin64 Bit

Post by srvet_claudio »

bpd2000 wrote:

Code: Select all

// BPD2000
#include "hmg.ch"

Function Main()
       Msginfo(IsWin64(),"IsWin64()" + space(10))
Return

function IsWin64()

Return IF(Len( GetEnv( "ProgramW6432" )) > 0 ,.T.,.F.)

This is correct because WOW64 only exists in 64-bit Windows.

PD: WOW64 is the abrebiación of Windows32 On Windows64
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: IsWin64 Bit

Post by srvet_claudio »

I will include:

Code: Select all

#xtranslate HMG_IsWin64() => IF( EMPTY( GetEnv( "ProgramW6432" ) ), .F., .T. )
Thanks Dave.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply