
Untitled
By: a guest on
Aug 7th, 2012 | syntax:
None | size: 0.68 KB | hits: 17 | expires: Never
First I had:
pZwUnmapViewOfSection = (PTRZwUnmapViewOfSection)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection");
pZwUnmapViewOfSection(pi.hProcess, (void *)pinh->OptionalHeader.ImageBase);
and got:
error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [10]' to 'LPCWSTR'
For the first line. So I changed the code to:
pZwUnmapViewOfSection = ((LPCWSTR)PTRZwUnmapViewOfSection)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection");
pZwUnmapViewOfSection(pi.hProcess, (void *)pinh->OptionalHeader.ImageBase);
and now I get:
error C2226: syntax error : unexpected type 'PTRZwUnmapViewOfSection'
For the first line.