tags:

views:

92

answers:

1

Hi, I've created a COM object using NATIVE c++ - both COM object and it's native client works perfectly.

the next step was to implement the COM object as a out of process COM server( hosted by the dllhost process. I followed the standard registry-change procedure(http://support.microsoft.com/kb/198891) and both client and COM server started to work properly under the dllhost.exe process.

However, I can see that sometime the host server crashes and the dllhost.exe pop up a message stating error 217 - nothing else is detailed.

Any idea how can I debug the COM infrastructure? any preferred tools I can use?

many thanks, Ofer

+1  A: 

However, I can see that sometime the host server crashes and the dllhost.exe pop up a message stating error 217 - nothing else is detailed.

I'm curious as to what happens here, in more detail -- does the dllhost process really crash (with a structured exception) or does it show a message box and then die?

You should be able to attach any debugger (Visual Studio or WinDBG) either when the problem happens or at any time in advance.

Break into the debugger and check the callstack when the problem occurs.

If it's due to a race condition of some kind, it may not surface when the debugger is attached, so I'd start with attaching when the message box is shown, and see what information can be gathered from there.

Presumably your code is in the callstack; if not, you may be short on luck.

Note that it always helps to have Microsoft symbols available, it's easiest via the public symbol server as described at the bottom of this page: http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx

Kim Gräsman