Get a Description of Errors in API functions

Category:
System/API
Type:
Snippets
Difficulty:
Intermediate
Author:
Intelligent Solutions Inc.

Version Compatibility:

More information:
When an error occurs in an API function, you can get the error code by reading Err.LastDllError. However, this numeric code doesn't tell you anything about why the error occurred. To get a human readable description of the error, you can use the function here.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: