Hi nidud,
allmul typedef proto :qword, :qword
extern _allmul:ptr allmul
Thanks but this declaration will not work here assuming that _allmul is a member of a static library. Here is a quick example :
MsgBox.asm :
include \masm32\include\masm32rt.inc
PUBLIC Mbox
.code
Mbox:
invoke MessageBox,0,DWORD PTR [esp+12],\
DWORD PTR [esp+12],MB_OK
ret 2*4
END
Test.asm :
include \masm32\include\masm32rt.inc
EXTERN Mbox:PROC
.data
msg db 'This is a test.',0
capt db 'Hello',0
.code
start:
invoke pr2 PTR Mbox,ADDR msg,ADDR capt
invoke ExitProcess,0
END start
invoke pr2 PTR Mbox assembled to :
push offset capt
push offset msg
call _Mbox
Trying this one :
include \masm32\include\masm32rt.inc
mb TYPEDEF PROTO :DWORD,:DWORD
EXTERN Mbox:PTR mb
.data
msg db 'This is a test.',0
capt db 'Hello',0
.code
start:
invoke Mbox,ADDR msg,ADDR capt
invoke ExitProcess,0
END start
invoke Mbox assembled to :
push offset capt
push offset msg
call dword ptr [_Mbox]
call dword ptr [_Mbox] will lead to an application crash. Same problem with the definition extern _allmul:ptr allmul