News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

IsWow64Process

Started by dedndave, June 17, 2014, 12:31:30 PM

Previous topic - Next topic

dedndave

i wonder if i could get you guys to test this for me
if you are running a 32-bit program (which it is) under a 64-bit OS, the result should be TRUE
if you run it under a 32-bit OS, it should display 00000000

let me know if it works correctly or not, and your OS and bits - thanks   :t

        INVOKE  GetModuleHandle,offset szKernel32
        INVOKE  GetProcAddress,eax,offset szIsWow64
        .if eax
            xchg    eax,ebx
            INVOKE  GetCurrentProcess
            push    -1
            push    esp
            push    eax
            call    ebx
            pop     eax
            print   uhex$(eax),13,10
        .else
            print   chr$('IsWow64Process function not present'),13,10
        .endif

        print   chr$(13,10)
        inkey
        INVOKE  ExitProcess,0


i am runing XP-32 SP3 and it displays 00000000

vogelsang

It returns 00000001 on Windows 7 64 bit.

sinsi

64-bits all return 1 - XPPro, Win7, Win8
32-bits all return 0 - XPPro, Vista, Win7
Function not present - Win2000  :biggrin:
🍺🍺🍺

vogelsang

I'm guessing - if your doing CPUID stuff, that link should be helpful:

http://developer.amd.com/resources/documentation-articles/processor-and-core-enumeration-using-cpuid/

It contains sample code which calls IsWow64Process.

Siekmanski

64 bit windows 8.1 returns 1
Creative coders use backward thinking techniques as a strategy.

Gunther

Windows 7-32:

00000000

Press any key to continue ...


The test under Windows 7-64 follows this evening.

Gunther
You have to know the facts before you can distort them.

dedndave

wow guys - that's great - thanks, again   :t

Sinsi has a regular test facility over there   :biggrin:

Gunther

Dave,

Quote from: dedndave on June 17, 2014, 07:39:00 PM
wow guys - that's great - thanks, again   :t

Sinsi has a regular test facility over there   :biggrin:

We like you. That's the reason.

Gunther
You have to know the facts before you can distort them.

Gunther

Dave,

the output from Windows 7 - 64:

00000001

Press any key to continue ...


Gunther
You have to know the facts before you can distort them.

RuiLoureiro

00000000       <----- 32 bit XP

Press any key to continue ...