|
-
May 4th, 2010, 12:22 AM
#1
Convert HRESULT hex error code to string
Hi all,
Is there a way to convert an HRESULT hex error code to a string? To better illustrate this, here is a sample code:
HRESULT hr = CoInitialize(NULL);
if(FAILED(hr))
{
//This is what I want to store into a string.
//"Failed to Initialize COM. Error code = 0x" << hex << hr << endl;
string hexerrorcode = ?;
CoUninitialize();
return 0;
}
I am not sure how to put it into string.
Can anyone help me with this?
Thank you!
Tags for this Thread
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
|