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.
AMGetErrorText Retrieves the error message text for a given message ID.
Retrieves the error message text for a given message identifier in the appropriate language.
Syntax
DWORD AMGetErrorText( HRESULT hr, TCHAR *pBuffer, DWORD MaxLen );
Parameters
- hr
- Message identifier for the message text to be returned.
- pBuffer
- Pointer to where the message text will be stored.
- MaxLen
- Number of characters that pBuffer points to.
Return Value
Returns the number of characters stored in the buffer, or zero if an error occurred.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.