CmEmbedded_4c_transp CmGetLastErrorText

Description

This function / method gets the error text of the last set error. The language of the text is the current set system language or English, if there's no language support for the system language. If the CM_GLET_DIALOG flag is set, the error text and some useful information are displayed in a message box (Windows / Windows CE only).

  • C, C++

Syntax

int CMAPIENTRY CmGetLastErrorText(CMULONG flCtrl, char *pszErrorText, CMUINT cbErrorText)

Parameter

flCtrl

nav_open CM_GLET_ERRORTEXT returns the related error text of the last set error code.

nav_open CM_GLET_DIALOG displays a message box with the related error text of the last set error code. This flag is only considered on Windows/Windows CE.

nav_open CM_GLET_DIALOG and CM_GLET_ERRORTEXT can be or'ed with the following flags:

nav_open CM_GLET_LOCAL_ENCODING uses local 8bit encoding.

nav_open CM_GLET_UTF8_ENCODING represents any character in the Unicode standard.

nav_open CM_GLET_WCHAR_ENCODING uses wide character encoding in ANSI/ISO C (UCS-2 on Windows/Windows CE and UTF-32 on Unix).

pszErrorText contains a pointer to a string to receive the error text.

cbErrorText contains the length of pszErrorText in bytes.

Return

This function returns the length of the error text or zero, if an error occurred. If pszErrorText does not contain enough memory, the number of needed bytes is returned.