Translate COM error codes in C#
Posted
by
Paul Keister
on Stack Overflow
See other posts from Stack Overflow
or by Paul Keister
Published on 2011-01-07T00:50:19Z
Indexed on
2011/01/07
0:53 UTC
Read the original article
Hit count: 313
In C, Pascal, and C++ it is possible to use the FormatMessage function to retrieve a "friendly" error message that corresponds to a COM HRESULT error code. This question contains sample code that demonstrates the C++ approach. Of course it would be possible to build a managed C++ assembly to perform this function for C# and VB.NET code, but I'm wondering: is there a way to translate COM error codes using the .NET system libraries?
© Stack Overflow or respective owner