Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. First I had:
  2.  
  3. pZwUnmapViewOfSection = (PTRZwUnmapViewOfSection)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection");
  4. pZwUnmapViewOfSection(pi.hProcess, (void *)pinh->OptionalHeader.ImageBase);
  5.  
  6. and got:
  7.  
  8. error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [10]' to 'LPCWSTR'
  9.  
  10. For the first line. So I changed the code to:
  11.  
  12. pZwUnmapViewOfSection = ((LPCWSTR)PTRZwUnmapViewOfSection)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection");
  13. pZwUnmapViewOfSection(pi.hProcess, (void *)pinh->OptionalHeader.ImageBase);
  14.  
  15. and now I get:
  16.  
  17. error C2226: syntax error : unexpected type 'PTRZwUnmapViewOfSection'
  18.  
  19. For the first line.