July 24, 2008

Parsing Error Codes

Translate common Windows system and network error messages with ease
RSS
View this exclusive article with VIP access -- click here to join |
See More Development Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
Executive Summary:

Use the ErrorParser.hta HTM Application (HTA) to convert numeric Microsoft Windows API system and network error codes—whether decimal, hexadecimal, or negative—into easy-to-understand Windows error-code descriptions.

 


Error messages are common occurrences, and script and program authors try to make them as informative as possible. However, unexpected errors sometimes force the script or program to simply display a numeric error code. Whether the error condition is a result of poor programming or an unexpected condition (e.g., a network outage), it's sometimes important to have the description for an error code. This task isn't always completely straightforward—the code can be displayed as decimal, hexadecimal, or even a negative number. To make it easier to retrieve error-code descriptions, I wrote ErrorParser.hta, an HTML Application (HTA) that lets you enter a numeric code and click a button to get the Windows description of the error.

Understanding Windows API Error Codes

Before I describe how ErrorParser.hta works, I need to provide a bit of background about error codes. As you might know, the Windows API has a large list of standard error codes. These codes are returned as 32-bit unsigned integers. Signed integers can store negative values, but unsigned integers can't. The range of values for 32-bit signed integers is -2,147,483,648 to 2,147,483,647; the range of values for unsigned 32-bit integers is 0 to 4,294,967,295. The difference between the two types of values is how the bits for the number are stored in memory: A signed integer uses one of the bits to indicate whether the number is positive or negative. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Articles How to Learn and Even Master the Art of Writing HTAs

Hooked on HTAs

Zen and the Art of Error Messages

Error Messages Should Contain Help not Panic

Development Whitepapers Global Trends: Unified SOA Performance Management Matters

The role of Service Level Agreements in Successful SOA Deployments

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Oracle Developer Day Online - EUROPE

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


SQL Server Magazine Office & SharePoint Pro DevProConnections asp.netPRO ITTV
IT Library Technology Resource Directory Connected Home Windows SuperSite
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc.     Terms of Use | Privacy Statement