Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


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
Reader Comments
I have not yet started scripting, but it seems inevitable as my computer science skills increase. I am happy preparing for such eventualities. Thank you for the tool.

rsschomburg September 06, 2008 (Article Rating: )


Aha, I was mistaken. As a registered user only, I was not given access to the complete article nor the tool. My opinion has changed. Sorry.

rsschomburg September 06, 2008 (Article Rating: )


Choose "Printer Friendly" (gray box near top of article) to see the whole article.

Search for "ErrorParser.hta" in Keyword Search box (top of page) to find article with link to download the code.

brad@friedlander.biz September 06, 2008 (Article Rating: )


How does this work? A partial article with an elipsis at the end with no link to the code and no way to continue the article. And I paid for the magazine!

wtpmac September 09, 2008 (Article Rating: )


Hi wtpmac,

You need to register on the web site and log on first, and then you should be able to access the article and download the HTA.

Regards,

Bill Stewart

AbqBill September 10, 2008 (Article Rating: )


Actually, if you purchased the magazine and are an "Registered User" you "have access to selected articles and the technical forums". I have paid for Windows IT Pro subscription, am a registered user, am logged in and have same result as rsschomburg, no download access for the HTA. ;(

crichards September 16, 2008 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

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

Windows 7 Sets Sales Record

Microsoft CEO Steve Ballmer described Windows 7's first ten days of sales as "fantastic" while in Japan yesterday. ...


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 WinConnections and Microsoft® Exchange Connections

DevConnections, Microsoft® ASP.NET Connections, SharePoint Connections and SQL Server Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

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


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement