IDirect3D9 * WINAPI CDirect3D9Hook::Direct3DCreate9_Hook(UINT SDKVersion) { CLogFile::Printf("Direct3DCreate9 Called"); // Call the real 'Direct3DCreate9' IDirect3D9 * pD3D = m_pfnDirect3DCreate9(SDKVersion); // If the call succeeded return our proxy device if(pD3D) { return new CDirect3D9Proxy(pD3D); } CLogFile::Printf("Direct3DCreate9 Call Failed!"); return NULL; }
IDirect3D9 * WINAPI CDirect3D9Hook::Direct3DCreate9_Hook(UINT SDKVersion) { IDirect3D9 * pD3D = m_pfnDirect3DCreate9(SDKVersion); return (!pD3D ? NULL : new IDirect3D9Proxy(pD3D)); }