Oc_waitforexterror, Oc_waitforexterror -73, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 133: Parameters: description, Return value: considerations, Example

Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-73
OC_WaitForExtError
Blocks the calling thread until an extended error is received from the
scanner or
msTimeout
milliseconds have elapsed.
Syntax:
int
OC_WaitForExtError(HANDLE handle,
DWORD msTimeout)
Parameters:
Description:
If an extended error has been received since the last extended error
message was retrieved with the OC_GetExtendedError function,
OC_WaitForExtError returns SUCCESS immediately.
Return Value:
Considerations:
Supported in the Windows NT API library only.
Example:
HANDLE
handle;
intrc;
OCEXTERR
exterr
/* Error handler thread */
while(1) {
/* loop forever */
OC_WaitForExtError(handle, INFINITE);
/* fetch the error data */
OC_GetExtendedError(handle, &exterr);
/*handle the error */
}
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
msTimeout
Specifies the number of milliseconds to wait
Set to INFINITE to wait forever
Name:
Value:
Description:
SUCCESS
0
an extended error occurred
ERR_RESPONSE
10
msTimeout
milliseconds elapsed without an extended error
ERR_OCACCESS
2
handle
does not have access to scanner