Oc_extendederrormsg, Oc_extendederrormsg -15, Return value – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 75: Syntax, Parameters

Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-15
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library.
Example:
HANDLE
Handle;
char
*msg;
int
rc;
if (SUCCESS != (rc = OC_OpenScanner(&Handle)))
{
/* Open failed - display error message */
OCErrorMsg(rc, &msg);
printf(“Error: %s\n”, msg);
}
OC_ExtendedErrorMsg
OC_ExtendedErrorMsg returns a descriptive text message associated
with an extended error.
Syntax:
int
OC_ExtendedErrorMsg(HANDLE handle, OCEXTERR
*exterr, char **msg);
Parameters:
Name:
Description:
SUCCESS
errcode
was valid.
msg
points to corresponding error description.
ERR_OCPARAM
errcode
was invalid.
msg
points to unknown error code string.
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
exterr
Points to an extended error
msg
Points to a static buffer that contains a null-terminated message
string for the associated extended error