
Publication 1747-UM002A-US-P - June 2000
6-74 Library of Routines
OC_WaitForIoInt
Blocks the calling thread until a module interrupt is received from the
scanner or
msTimeout milliseconds have elapsed.
Syntax:
int OC_WaitForIoInt(HANDLE handle, DWORD msTimeout)
Parameters:
Description:
If a module interrupt has been received since the last OCMSG_IOINT
message was retrieved with the OC_PollScanner function,
OC_WaitForIoInt returns SUCCESS immediately.
Return Value:
Considerations:
Supported in the Windows NT API library only.
Example:
HANDLE handle;
intrc;
MSGBUF mintMSG
/* Wait for 10 seconds for a module interrupt*/
rc = OC_WaitForIoInt(handle, 10000);
switch(rc) {
case SUCCESS: /* got a module interrupt*/
/* fetch the module interrupt message */
OC_PollScanner (handle,OCMSG_IOINT,&mintMSG);
/* handle the module interrupt */
break;
case ERR_OCRESPONSE:/* timed out */
printf(“\nTimed out waiting for module interrupt\n”);
break;
default;
printf(“\nError!\n”);
break;
}
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 a module interrupt was received
ERR_RESPONSE 10
msTimeout milliseconds elapsed without a module interrupt
ERR_OCACCESS 2
handle does not have access to scanner
Komentáře k této Příručce