Retrieves the error message for the specified error number.
FormatMessageEx(nLastError [, nLanguageId [, nModuleHandle]])
Parameters
- nLastError
The error number.
- nLanguageId (optional)
default = 0
The language identifier for the requested message.
If you pass a specific LANGID in this parameter, FormatMessageEx will return a message for that LANGID only. If the function cannot find a message for that LANGID, it sets Last-Error to ERROR_RESOURCE_LANG_NOT_FOUND. If you pass in zero, FormatMessageEx looks for a message for LANGIDs in the following order:
Language neutral
Thread LANGID, based on the thread's locale value
User default LANGID, based on the user's default locale value
System default LANGID, based on the system default locale value
US English
- nModuleHandle (optional)
default = 0
A handle to the module that contains the message table to search.
Return Value
The error message.