flat assembler
Message board for the users of flat assembler.
Index
> Windows > Passing polymorphic types to procedures? |
Author |
|
LocoDelAssembly 23 Jan 2009, 17:19
Code: proc OnCreate hwnd,lpCreateStruct ; Lets make it a 4:3 window mov eax, [lpCreateStruct] mov edx, [eax+CREATESTRUCT.cx] lea edx, [edx*3] shr edx, 2 mov [eax+CREATESTRUCT.cy], edx ret endp (The code could not be doing what the comment says ) |
|||
23 Jan 2009, 17:19 |
|
bitshifter 23 Jan 2009, 18:29
So to get the CREATESTRUCT::HINSTANCE i can do it like this?
Code: proc OnCreate hwnd,lpCreateStruct mov eax,[lpCreateStruct] mov edx,[eax+CREATESTRUCT.hInstance] ; edx now contains HINSTANCE ? ret endp |
|||
23 Jan 2009, 18:29 |
|
LocoDelAssembly 23 Jan 2009, 18:32
That is correct, edx now contains lpCreateStruct->hInstance.
|
|||
23 Jan 2009, 18:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.