News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Using _imp__ in a macro with INVOKE

Started by sinsi, August 17, 2006, 06:02:05 AM

Previous topic - Next topic

ToutEnMasm

opcodes are Hexadecimales and go with there Mnemonics (text instructions),you have the complet list of the instructions of the microprocessor in a help file in the masm32 package.
Intel Hex Opcodes And Mnemonics
                                        ToutEnMasm


Vortex

Sinsi,

If I undestand you correctly, you would like to use direct calls. Hutch's masm32 provides the l2extia tool :

QuoteL2EXTIA.EXE

This is an alternative method of creating include files that can be used
with MASM32. It produces include files in the EXTERNDEF format for system
DLL imports. This method allows direct calls to imported functions rather
that the lookup table that is the native format for MASM 32 bit EXE files.

C:\masm32\tools\l2extia

sinsi

Wow. Thanks for the replies.

As far as JMP goes, I only use it for ExitProcess (hey, it saves a RET byte).

My windows.inc works just fine, all I was wondering about was the main macro, because
it seems to be a bit of a mess (well, beers and code mix so well until the next day...)

Light travels faster than sound, that's why some people seem bright until you hear them.

dedndave

i realize this is a very old thread, but i am using it for reference and want it in my list

this code works

        mov     esi,labelA-4       ;get the relative address from INVOKE
        mov     esi,labelA[esi+2]  ;get the address part of the indirect JMP
        mov     eax,[esi]          ;get the API target refered to in the JMP
        call    eax
        exit

        INVOKE  GetCurrentProcess
labelA  label   dword