Get Error Messages from the System and Specific Modules
Category:
System/APIType:
ModulesDifficulty:
IntermediateAuthor:
Arkadiy OlovyannikovVersion Compatibility: Visual Basic 6, Visual Basic 5
More information:
Since IE5.5 MS include Message Tables in resources in Unicode format. So, all previous snippets to retrive messages from modules wit FormatMessage(FORMAT_MESSAGE_FROM_HMODULE...) don't work (while system messages in kernel32 still store in ANSI format). This module allow you to retrive any mesage from system/module by its number.
See the bottom of the snippet for sample usage.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: