By using event, all states (interval timer and so on) during device operation can be notified to the application program.
For event notification, it is possible to know what event occurred by the passed parameter, and then perform corresponding handling.
There are two methods for event notification.
Message Notification
It is a method of executing
the PostMessage function of Win32API from the driver and notifying messages
to the application.
It is a usual way for event notification.
For creating the handler for event notification, the method varies with
the development language being used.
This method cannot be used by applications without Window handle (console
application and so on).
How to create event message
routine
Visual Basic .NET
Visual C# .NET
Visual C++ (MFC)
Callback Function
Register the created callback
function first, the driver will call the function directly for event notification.
Though it is necessary to handle pointers and function pointer etc., the
code is less and simple.
The performance is higher than Windows message notification, and it can
also be used by applications without Window handle (console application
and so on).
How to create
callback function
Visual
Basic .NET
Visual
C# .NET
Visual
C++ (MFC)