Download Software User Manual

Transcript
3.3.2.2 dLibError
dLibError translates an API error code (the return code from any isoLynx API
function) to a textual description. It does so by searching the API error files
(LYNXLIB.ERR, ISOLYNX.ERR, SERIAL.ERR, SOCKET.ERR) for the error
code. The API error files are text files that contain error codes and their
corresponding textual descriptions. It is this description that is returned by
dLibError.
The error files must exist in the data path specified when the library is opened
(see dLibOpen). If not, a string indicating the error code was not found is
returned (see below).
Prototype:
long dLibError( long error, char* text, long maxlen );
Inputs:
error
The error code to translate.
text
Pointer to empty character array. To be filled in by function (see
below).
maxlen
Maximum length of text array.
Outputs:
text
Filled in by dLibError with a NULL-terminated string that is the
textual description of the given error code.
If error is not found or if the error files were not found, text is filled
in with this NULL-terminated string constant: “?”.
86