|
-
October 14th, 2002, 11:42 AM
#1
HRESULT error code
Where can I go to find out what a specific HRESULT error code means. I have this error codes -1072882847 and I want to find out what it means. It happens when I am trying to start a windows media encoder session.
Mike@spb
-
October 14th, 2002, 11:50 AM
#2
You can use VS quickwatch window.
just enter your value with ',hr' at the end and recalculate
e.g
if your HRESULT value name is 'rc' ,enter in the QuickWatch window 'rc,hr'
-
October 14th, 2002, 12:22 PM
#3
Thanks, but what about when you get an error while testing the application. I am currently testing the application and I have setup an static box to display any HRESULT errors that may happen. This error does not happen while in debug mode but when I am actually testing the application (.exe) itself.
Mike@spb
-
October 14th, 2002, 02:20 PM
#4
HRESULT decode via <winerror.h>
Convert your error code to a hex DWORD, i.e. -1072882847 converts to 0xC00D1B61.
Then open <winerror.h> and use it to help you decode the error code.
// excerpt from <winerror.h> ...
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
i.e. 0xC00D1B61
=> Severity = 0xC = 1100 Error
=> Facility Code = 0xD =1101 MediaServer
=> 0x1b61 = 7009 decimal.
Hope this helps.
Good luck.
-Ron
-
October 14th, 2002, 03:39 PM
#5
There is also a "error look up" tool which ships with Visual Studio (...\Microsoft Visual Studio\Common\Tools\errlook.exe) and appears usually in the Tools-menu.
Copy and paste (or drag and drop) your error code into the edit field of this tool and it will give a textual description.
The tools searches the system libraries but it is also possible to add custom libraries which contain error resources created and compiled by the message compiler.
-
October 14th, 2002, 03:44 PM
#6
Thanks, I tried that but it did not give me any answer.
I am new to VC++ and now that I know to convert those HRESULTS value to hex I was able to do a search of the hex value on Microsoft's site and come up with the solution as to what this particular code meant.
Mike@spb
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
|