• Advertisement
Sign in to follow this  

LoadLibrary problem 998

This topic is 4347 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Solved it. But maybe you guys can explain it cuz I can’t.

I removed the dplayx.lib from the test project and after that it works. This might not be as far fetched as I first thought. The dplayx.lib and dplayx.dll are compiled together and have references between each other. But those references are not valid in my dplayx.dll so that must somehow be the problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement