flat assembler
Message board for the users of flat assembler.
Index
> Windows > Define proc inside a struct |
Author |
|
revolution 26 Feb 2017, 00:11
If you want to pass parameters to .Print then you can do it just as normal. Assuming you are using stdcall then:
Code: struct String DATA jmp .x .len dw .strend-.str .str db DATA,' ' .strend db 0 .Print: ;access first parameter at [esp+8] invoke MessageBox,HWND_DESKTOP,.str,[esp+8],MB_OK ret .x: ends my_string String 'Title' stdcall my_string.Print,'Text' ;pass 'Text' as a parameter |
|||
26 Feb 2017, 00:11 |
|
M_H 26 Feb 2017, 12:50
revolution wrote: If you want to pass parameters to .Print then you can do it just as normal. Assuming you are using stdcall then: i don't think its that easy Im keeping recieving this error: Operand size not specifing push [ebp+8] _________________ Lets Learn Assembly |
|||
26 Feb 2017, 12:50 |
|
revolution 26 Feb 2017, 12:54
Okay I forgot the dword override.
Code: invoke MessageBox,HWND_DESKTOP,.str,dword[esp+8],MB_OK |
|||
26 Feb 2017, 12:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.