I have a small question about .NET class COM wrappers.
I'm calling a .NET class from a C++ client (No problems so far J)
The #import directive in C++ creates the COM wrapper functions and throws a
COM exception if the HRESULT fails (normal .tli)
In the .NET class library I implemented a hierarchy of exception classes
specific to my class library (all derived from ApplicationException) and I
set the HRESULT of each of these classes to a custom HRESULT (in the
I would like to also set the message string of these errors.
When the _com_error reaches the C++ client then e.ErrorMessage() returns a
pre-built message for the HRESULT that I specified in the exception class'
Is there a way to set this to a custom message?
Thanks in advance