I have an application which uses Direct3D. When my application starts, I notice that the DDHelp.exe process is started (on win98). I get the following debug output (from the debug version of DirectX 8 sdk):
Direct3D8: :====> ENTER: DLLMAIN(bab0ff14): Process Attach: fffc07cb, tid=fffc0537
Direct3D8: :DDHELP already exists, waiting for DDHELP event
Direct3D8: :Asking for DDHELP pid
Direct3D8: :DDHELP pid = fffc8be3
Direct3D8: :Thunk connects
Direct3D8: :Waiting for DDHELP startup
Direct3D8: :Wait DDHELP startup event to be triggered
Direct3D8: :Asking DDHELP to load DLL DDRAW.DLL
Direct3D8: :Signalling DDHELP that a new process has connected
Direct3D8: :====> EXIT: DLLMAIN(bab0ff14): Process Attach: fffc07cb
Direct3D8: :====> ENTER: DLLMAIN(bab0ff14): Process Detach fffc07cb, tid=fffc0537
Direct3D8: :====> EXIT: DLLMAIN(bab0ff14): Process Detach fffc07cb
My application seems to start normally. However, when I call CreateDevice on D3D, the application crashes. The crash occurs in one of my application's dlls, which is where D3D gets initialized.
The strange thing is, that if I kill the application (not shut it down normally, but really kill it), then the second time I run it everything works fine (including hardware accelerated 3D graphics).
Here is the output from the 2nd run (the successful one):
Direct3D8: :====> ENTER: DLLMAIN(bab0ff14): Process Attach: fffd8943, tid=fffcdd9b
Direct3D8: :Thunk connects
Direct3D8: :Signalling DDHELP that a new process has connected
Direct3D8: :====> EXIT: DLLMAIN(bab0ff14): Process Attach: fffd8943
Notice that the 2nd time, there are several fewer DDHELP-related messages. Notice also that the process is not detached.
The dll that makes the Direct3D calls is also a Netscape plugin, and it runs just fine in Netscape. The only relevant difference I can think of between my application that loads the dll and Netscape is the fact that the my application uses DirectShow and DirectSound. My application links statically with the DirectX libraries, and I think that's why DDHelp.exe gets started when my app loads.
Why is the process getting detached the first time? What are all those extra DDHelp messages?
I know this is a tricky problem, and I'd really appreciate any insight anyone with some good DirectX experience may have.
Thanks,
circuit