An alternative macro for 32-bit programming. It does not require functions prototypes and registers can be specified instead of function names. The same macro works with HJWasm and Masm.
A quick example :
include ..\MessageBox.inc
.data
msg db '_invoke macro test',0
capt db 'Test',0
MsgBox db 'MessageBoxA',0
user32 db 'user32.dll',0
.data?
hLib dd ?
.code
start:
_invoke LoadLibrary,ADDR user32
mov hLib,eax
_invoke GetProcAddress,eax,ADDR MsgBox
_invoke eax,0,ADDR msg,ADDR capt,MB_OK
; without the _invoke macro :
; invoke pr4 PTR eax,0,ADDR msg,ADDR capt,MB_OK
_invoke FreeLibrary,hLib
_invoke ExitProcess,0
END start