dsmRCMsg
The dsmRCMsg function call obtains the message text that is associated with an API return code.
Important: If
dsmRCMsg is called after a dsmInitEx fail, the Servername option will be
ignored and an error will be printed in a log file, which is defined for the server by
default.
The msg parameter displays the message
prefix return code in parentheses ( ), followed by the message text. For example,
a call to dsmRCMsg might
return the following:
ANS0264E (RC2300) Only root user can execute dsmChangePW or dsmDeleteFS. For some languages where characters are different in ANSII and OEM code pages, it might be necessary to convert strings from ANSII to OEM before printing them out (for example, Eastern European single-byte character sets). The following is an example:
dsmRCMsg(dsmHangle, rc, msgBuf);
#ifdef WIN32
#ifndef WIN64
CharToOemBuff(msgBuf, msgBuf, strlen(msgBuf));
#endif
#endif
printf(" Syntax
dsInt16_t dsmRCMsg (dsUint32_t dsmHandle,
dsInt16_t dsmRC,
char *msg); Parameters
- dsUint32_t dsmHandle (I)
- The handle that associates this call with a previous dsmInitEx call.
- dsInt16_t dsmRC (I)
- The API return code of the associated message text. The API return codes are listed in the dsmrc.h file. See API return codes source file: dsmrc.h for more information.
- char *msg (O)
- This parameter is the message text that is associated with the return
code, dsmRC. The caller is responsible for allocating enough
space for the message text.
The maximum length for msg is defined as DSM_MAX_RC_MSG_LENGTH.
On platforms that have National Language Support and a choice of language message files, the API returns a message string in the national language.
Return codes
The return code numbers are provided in parentheses ( ).
| Return code | Explanation |
|---|---|
| DSM_RC_NULL_MSG (2002) | The msg parameter for dsmRCMsg call is a NULL pointer. |
| DSM_RC_INVALID_RETCODE (2021) | Return code that was passed to dsmRCMsg call is an invalid code. |
| DSM_RC_NLS_CANT_OPEN_TXT (0610) | Unable to open the message text file. |