Original Post
Hi I'm trying to hook IDirectPlay3 interface for combat flight simulator 1. At the moment I have a test project using direct play to debug and test my hookdll. I’ve created my own dplayx.dll file and I want to forward calls to the original dplayx.dll file. From the dllmain in fake dplayx dll I try to load the dplayx_.dll which is the original dll file I get GetLastError() 998 (ERROR_NOACCESS 998 Invalid access to memory location). Loading the dll from the parent process (testproject main) c:\\windows\\system32\dplayx.dll there is no problem. I read something about trusted and untrusted dlls/processes http://support.microsoft.com/kb/q196069/ My first attempt was to inject a dll with CreateRemoteThread and hook the function CoCreateInstance (ole2.dll) or DirectPlayCreate but combat flight simulator doesn’t use dplayx.dll or dplay.dll or dpnet.dll. Using dumpbin /dependents I can’t find any dependencies to and direct play dll very strange. Yet it uses directplay. Combat flight simulator 3 uses DllGetClassObject comobject interface to get comobjects. Either way I need to load that dll. I've successfully done this with combat flight simulator 3. calls game-> dplayx.dll -> dplayx_.dll Any ideas to what can be wrong?