The Errors.h header file provides a function for getting an error message for a given message identifier in the current language. The same header also provides the MAX_ERROR_TEXT_LEN equate, which indicates the maximum number of characters allowed in a message.
| Function | Description |
| AMGetErrorText | Gets the error message text for a given message ID. |
Retrieves the error message text for a given message identifier in the appropriate language.
DWORD AMGetErrorText(
HRESULT hr,
TCHAR *pBuffer,
DWORD MaxLen
);
Returns the number of characters stored in the buffer, or zero if an error occurred.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.