How do I get a pointer or a function compatible with this? (have LH compiler)
Announcement
Collapse
No announcement yet.
MemoryEx: Function pointer
Collapse
X
-
If you have a dll with that function in there, use;
Code:local lpFunction = hLibrary:GetProcAddress_("FunctionName");
function you assembled, will be an actual function you can use in these kinds of
operations.
To get the pointer of an assembled function, use
Code:local lpFunction = hAssembled.ptr
Comment
-
-
Here's one way;Code:ASM.Initialize(); user32 = Library.Load("user32.dll"); mbox = user32:GetProcAddress_("MessageBoxA"); local hASM = ASM.Assemble([[ USE32 ORG 100h PUSH EBP MOV EBP, ESP PUSH DWORD [EBP + 20] PUSH DWORD [EBP + 16] PUSH DWORD [EBP + 12] PUSH DWORD [EBP + 8] MOV EAX, DWORD ]]..mbox..[[ CALL EAX POP EBP RETN ]]) hASM(Application.GetWndHandle(), "Hello World!", "Title", 68); local ptr = hASM.ptr;
have IMXLH automatically get the dependencies for you.
Comment
-
Comment