Radsoft
 About | Buy | News | Products | Rants | Search | Security
Home » Gallery Radsoft XPT — Industrial Strength Software

X-news

One of the most aggravating things during application development is watching a function just quietly not work. On the other side of the fence there's an error code that can be picked up on a per thread basis, but even this numerical value is not much help. Enter X-news.

This handy little app will sit right above your system tray and at the click of a button show you exactly what the system has to offer. The great thing about the way it's all set up is that all actual diagnostic strings are stored in the operating system proper: all you need do is input the right value to see what the message would be.

System Error Codes & OLE Error Codes: How They Differ

System and OLE error codes are subtly different; X-news shows how codes shape up with both layouts. Also, as system error codes are normally given in decimal and OLE error codes are normally given in hex, X-news has input fields for each - and just for good measure has a 32-bit binary input field as well.

System Error Code Layout

System error codes are always 32-bit and the bits are divided up as follows.

3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0

9

8

7

6

5

4

3

2

1

0
SevCRFacilityCode

Sev is the severity level: officially 00 means 'success', 01 means 'informational', 10 means 'warning', and 11 means 'error', but in practice any non-zero error code is hardly 'success' or merely 'informational', and 'error' is almost never used.

C is the 'customer code flag', i.e. this bit is never set in a system error code, so that this range can be used by customized applications instead.

R is a 'reserved' bit.

OLE Error Code (HRESULT) Layout

OLE error codes are subtly different.

3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0

9

8

7

6

5

4

3

2

1

0
SRCNrFacilityCode

S is again the severity level, 0 indicating success, 1 indicating failure. In other words, real errors all have negative values.

Fields R, C, N, and r are all reserved.

Common Layout

Both layouts share the Facility and Code fields, OLE using one less bit for the former.

Facility is the facility code: currently there are eleven facility codes defined.

ValueFacility
0FACILITY_NULL
1FACILITY_RPC
2FACILITY_DISPATCH
3FACILITY_STORAGE
4FACILITY_ITF
7FACILITY_WIN32
8FACILITY_WINDOWS
9FACILITY_SSPI
10FACILITY_CONTROL
11FACILITY_CERT
12FACILITY_INTERNET

Code is the facility's status code, a 16-bit value.

All of these fields are masked off and displayed, along with the actual diagnostic message if any, in X-news.

X-news becomes indispensable both for developers needing a fast check on programming errors and for sysadmins and beta testers needing to get the proper diagnostics 'back to the factory'.

File size: 6KB.

About | Buy | News | Products | Rants | Search | Security
Copyright © Radsoft. All rights reserved.