Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  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. . . .

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 log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

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

How can I stop and start services from the command line?

...

Where is Microsoft NetMeeting in Windows XP?

...


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 Batch Job Scheduling and .NET in 2008

Related Events SQL Server 2008 – Can You Wait? | Philadelphia

SQL Server 2008 – Can You Wait? | Atlanta

SQL Server 2008 – Can You Wait? | Chicago

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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


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 Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing