|
-
December 14th, 2008, 04:44 PM
#1
HRESULT to string ??
Hi ,
Ia there a function who converts HRESULT value to a string so instread of getting the following output:
I have:
Code:
HRESULT hr;
hr = MyFunc();
if ( FAILED(hr) )
{
Log << "HRESULT=" << hr;
}
Output:
HRESULT =-2147418113
I'll get:
Desired output:
HRESULT=E_UNEXPECTED (2147418113 )
Many thanks!
-
December 15th, 2008, 03:35 AM
#2
Re: HRESULT to string ??
Last edited by unnamed; December 15th, 2008 at 05:45 AM.
-
December 15th, 2008, 11:09 AM
#3
Re: HRESULT to string ??
 Originally Posted by unnamed
Tried FormatMessage()?
Thanks man it's working !!
I didn't know that win32 and hresult error code definitions are both defined under the same file.
Do you know if there are another mesasages FormatMessage() can format except of win32 & hresult ?
Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|