Hi all,
I'm porting application in C++ to MASM. In my C++ application I have:
vector<PESection *> Sections;
How to write this in MASM?
Regards, David
Sections is a pointer to a dynamic pointer-array:
mov edi,alloc(SIZEOF PVOID)
; edi = Sections = ptr ptr PESection
; PVOID ptr [edi][0] = ptr PESection
Better than answer questions one by one add:
/FA in project ---->Property ---> c++ --->commande line
Build the project
open a file and you got an asm file like this:
Quote
; Line 58
push OFFSET $SG4191
mov eax, DWORD PTR _p1$[ebp]
push eax
call _strcpy
add esp, 8
; Line 60
push 34 ; 00000022H
call _malloc
add esp, 4
mov DWORD PTR _p2$[ebp], eax
And all your questions are answered
(http://img291.imageshack.us/img291/2152/thankstu.png)
Thanks!