By using events, the status of data reception via CAN communication 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.
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.
This is not supported by API-CAN(WDM).
Register the created callback function first, the driver will call the function directly for event notification
Though it is necessary to handle the pointers and function pointer, 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#
Visual C++ (MFC)