User manual

172
Setting event notification
hEvent = CreateEvent( NULL, FALSE, FALSE, TEXT( “OBRScanningEvent” ) );
OBRSetScanningNotification( OBR_EVENT, NULL );
OBROpen( NULL, 0 );
WaitForSingleObject( hEvent, INFINITE );
Use OBRGetLastEventStatus to confirm parameter (scan success / failure)
Scan success ?
Data capture using OBRGets
Scan end ?
OBRClose();
CloseHandle( hEvent );
Yes
No
Yes
No
Figure 5.2 Flowchart
1. Named event is initialized.
2. Notification for scanning completion is set to event output with
OBRSetScanningNotification func
tion.
3. After opening the scanner with OBROpen func
tion, the flow waits until named event is issued
with WaitForSingleObject, etc.
4. After receiving the named event, conditions why the event is issued are checked with
OBRGetLastEventStatus function.
5. If scanning is succeeded, data output to each output destination will be processed.
6. Carry out OBRClose funct
ion to close the scanner.