If I implement a COM interface in a C# class, which will be called from a C++ module, then in case of a failure the C# code should throw an exception; this will be marshalled to a HRESULT failure code by the interop layer.
But will any message text (or other information) passed to the Exception constructor also be available to the calling C++ code? If so, how can it be obtained i.e. which API methods?
e.g. if in my C# code I do throw new ArgumentException("The email address is invalid")
I would except my COM HRESULT to be E_INVALIDARG
but will my custom text be marshalled or can I only look up a text description of E_INVALIDARG
?