Oc_waitforexterror -84 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 138

Advertising
background image

6–84

Library of Routines

OC_WaitForExtError

Publication 1747-6.5.3 June 1998

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;
OCEXTERRexterr

/* 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

Advertising
This manual is related to the following products: