How to JIT debug exceptions from a COM local server in Visual C++ (198623)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 6.0, when used with:
- the operating system: Microsoft Windows NT
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Visual C++ 2005 Express Edition
This article was previously published under Q198623 Note Microsoft Visual C++ .NET (2002) supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. The information in this article applies only to
unmanaged Visual C++ code.
Note Microsoft Visual C++ 2005 supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. SUMMARY When an exception (for example, an access violation) is
thrown from within a COM method, the server gets the first chance to handle the
exception. If the server does not handle the exception, the COM/remote
procedure call (RPC) run time handles it and returns an error indicating the
exception was thrown. This behavior is by design.
The result of
this is that no exception thrown in a COM method [including DebugBreak()] ever goes unhandled. As a result, just-in-time (JIT) debugging
of COM local servers is difficult at best.
This article presents a
way to JIT debug some exceptions from a COM local server. The article also
explains how to pseudo-JIT debug a COM local server for other exceptions.
Modification Type: | Major | Last Reviewed: | 1/5/2006 |
---|
Keywords: | kbDebug kbhowto KB198623 kbAudDeveloper |
---|
|