SDLLHook D3DHook =
{
"D3D9.DLL",
false, NULL,
{
{ "Direct3DCreate9", MyDirect3DCreate9},
{ NULL, NULL }
}
};
// Hook function.
IDirect3D9* WINAPI MyDirect3DCreate9(UINT sdk_version)
{
// Let the world know we're working.
MessageBeep(MB_ICONINFORMATION);
MessageBox(NULL, "MyDirect3DCreate9", "Info", MB_OK);
OutputDebugString( "Direct3D-Hook: MyDirect3DCreate9 called.\n" );
Direct3DCreate9_t old_func = (Direct3DCreate9_t) D3DHook.Functions[D3DFN_Direct3DCreate9].OrigFn;
IDirect3D9* d3d = old_func(sdk_version);
return d3d? new MyDirect3D9(d3d) : 0;
}
.....................................
bool res = HookAPICalls(&D3DHook);
I trying to use Launcher and DLL. In some programs my hook works fine, and in other programs it fail. In others program even not entry in func MyDirect3DCreate9() (see above). What is the matter?
Thanks in advance.






