Translate HRESULT into a readable message

Can someone provide some information on how to programmatically translate HRESULT values ​​( http://en.wikipedia.org/wiki/HRESULT ) into a human-readable message?

I know that the ERR.EXE utility does this, but my application should display some meaningful message for my users, and not for the critical 0x800A03EC.

+5
source share
2 answers

There is no built-in support for generating messages from HRESULT with this value. The COM component must implement this itself using the IErrorInfo interface.

CLR, .NET, , . , , COM- . Message IErrorInfo. , , COM .

, 0x800a03ec, Excel . , googling "excel error 1004".

+3

FormatMessage? # PInvoke.

+3

All Articles