Hello Everybody,
How do I pass a string to a procedure? For example, I could pass a dword....
MyProc PROTO :DWORD
MyProc PROC foo:DWORD
mov eax, foo
...
ret
MyProc ENDP
invoke MyProc, 100h
But with a string? Do I just pass the address? But then how, would I reference that in the procedure itself...
MyProc PROC msg:DB 1024 DUP('1')
invoke MessageBox, hWnd, addr msg, addr AppName, MB_OK
...
ret
MyProc ENDP
MyProc PROC msg:DWORD
invoke MessageBox, hWnd, msg, addr AppName, MB_OK
...
ret
MyProc ENDP
I'm a but confused by this one.
don't pass the string
pass the address of the string (pointer)
MyProc PROC lpszFoo:LPSTR
mov eax, foo
...
ret
MyProc ENDP
INVOKE MyProc,offset szString