Advertisement
captmicro

DrvPopImageData LHK

Jan 14th, 2013
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.85 KB | None | 0 0
  1. LUA_FUNC(DrvPopImageData)
  2. {
  3.     DrvImageList imageinfo;
  4.     DWORD dwBytesRead = 0;
  5.    
  6.     DeviceIoControl(hkLHK, IOCTL_POPIMAGEDATA,
  7.         0, 0,
  8.         &imageinfo, sizeof(DrvImageList),
  9.         &dwBytesRead, 0);
  10.     if (dwBytesRead == sizeof(DrvImageList))
  11.     {
  12.         lua_pushstring(l, imageinfo.FullImageName);
  13.         lua_pushinteger(l, (DWORD)imageinfo.ProcessId);
  14.         lua_pushinteger(l, (DWORD)imageinfo.ImageInfo.ImageBase);
  15.         lua_pushinteger(l, imageinfo.ImageInfo.ImageSize);
  16.         lua_pushinteger(l, imageinfo.ImageInfo.ImageSelector);
  17.         lua_pushinteger(l, imageinfo.ImageInfo.ImageSectionNumber);
  18.         lua_pushinteger(l, imageinfo.ImageInfo.ImageAddressingMode);
  19.         lua_pushinteger(l, imageinfo.ImageInfo.ImageMappedToAllPids);
  20.         lua_pushinteger(l, imageinfo.ImageInfo.SystemModeImage);
  21.         lua_pushinteger(l, imageinfo.ImageInfo.Reserved);
  22.         return 10;
  23.     }
  24.  
  25.     lua_pushnil(l);
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement