Description, Return value: considerations, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 76

Publication 1747-UM002A-US-P - June 2000
6-16 Library of Routines
Description:
This function is useful when displaying an error message. You should
use OC_GetExtendedError to obtain the message before using
OC_ExtendedErrorMsg to display the message. If you don’t use
OC_GetExtendedError first, OC_ExtendedErrorMsg displays a null
message.
The
OCEXTERR
structure is defined as:
#define OCERRDATASIZE3/* number of bytes of error data */
typedef struct tagOCEXTERR
{
BYTEErrorCode;/* Extended error code */
BYTESlotNum;/* Associated slot number */
BYTEErrorData[OCERRDATASIZE];/* Error code data
*/
} OCEXTERR;
See appendix A for error codes.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
OCEXTERR
exterr;
char
*msg;
int
retcode;
/* Should already have called
OC_GetExtendedError() to obtain exterr */
retcode = OC_ExtendedErrorMsg( Handle, &exterr,
&msg );
printf(“ERROR:%s\n”, msg);
Name:
Value:
Description:
SUCCESS
0
extended error information was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner