Public paste
Undefined
By: Guest | Date: Nov 30 2009 16:55 | Format: None | Expires: never | Size: 397 B | Hits: 479

  1. void D3DHook::InitHook()
  2. {
  3.         while(!(this->hD3D9 = GetModuleHandle("d3d9.dll")))
  4.                 Sleep(10);
  5.  
  6.         PVOID pvHkEndScene = (PVOID)(DWORD)hkEndScene;
  7.         this->p_d3dEndScene = (DWORD)(EndScene_t) DetourAttach((PVOID*)0x4FDD71B0, pvHkEndScene);
  8. }
  9.  
  10. DWORD D3DHook::hkEndScene(LPDIRECT3DDEVICE9 p_d3dDevice)
  11. {
  12.         this->p_d3dDevice = (DWORD) p_d3dDevice;
  13.         DWORD pD = (DWORD) p_d3dDevice;
  14.         return pD;
  15. }