Specifications
107
2.11.2 Read Completion and Error Notification
Read Completion Notification
The terminal will notify application program of the fact that the read/analysis of data or raw data
retrieve is completed at that point in time. The notification method can be either by event or by
message, and the initial setting is the latter. (This notification method can be modified with
MCRSetEventNotification function) In case of notification by message, a message of
WM_MCR_READING defined in the mcrlib.h header file will be posted when data
read/analysis is completed. When application program passes the window handle to the MCR
driver when it is opened, notification of this message will be posted to the handle, however, if the
application program does not pass the window handle (i.e. specifies NULL), the message will then
be broadcasted. If the notification method is specified as “by named event”, a named event that is
defined in the registry of the terminal will be posted (this event name can be modified through the
registry; the initial setting is MCREventReading). Therefore, an application that has set up the
notification method to “by event” must use WaitForSingleObject function, etc., to wait for a
data read/analysis completion event.
Note:
Before a read/analysis completion notification is posted, the initial condition (0) is stored both as
data and error information. As a result, if the application attempts to retrieve data just before the
notification, it may get the data being currently written. Therefore, data retrieve must be made
only after the event has occurred.
The functions of the MCR Library relevant to the “Read Completion and Error Notification” are
as follows.
MCRSetEventNotification
: Sets up the notification method for data retrieve.
MCRGetEventNotification
: Retrieves the data retrieve notification method.