Jump to content

[MASM] Loading API's Dynamically


Recommended Posts


.model flat, stdcall

option casemap:none

include \masm32\include\windows.inc

include \masm32\include\kernel32.inc

includelib \masm32\lib\kernel32.lib



Message db "Message",0

Box db "BoxA",0

sTest db "MessageBoxA API Call",0

sDemo db "Demo",0

sLib db "user32",0




hLib dd ?

Func dd ?

Result db ?





invoke lstrcat,addr Result,addr Message

invoke lstrcat,addr Result,addr Box

invoke LoadLibrary,addr sLib

mov hLib, eax

invoke GetProcAddress,hLib,addr Result

mov Func, eax

push 0

push offset sDemo

push offset sTest

push 0

call Func

invoke ExitProcess,0

end start[/LENGUAJE]

Link to comment
Share on other sites

This topic is now closed to further replies.

Chat Room

Chat Room

Chatroom Rules

No support in chat, open a thread.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

The popup will be closed in 15 seconds...