DriverCallback

BOOL DriverCallback(dwCallBack, uFlags, hDevice, uMsg, dwUser, dwParam1, dwParam2)
 

This function notifies a client application by sending a message to a window or callback function or by unblocking a task.

DWORD dwCallBack
Specifies either the address of a callback function, a window handle, or a task handle, depending on the flags specified in the wFlags parameter.
UINT uFlags
Specifies how the client application is notified, according to one of the following flags.
DCB_NOSWITCH Use this if you know you have enough stack space for the callback; otherwise MMSYSTEM will switch your stack for you.
DCB_FUNCTION The application is notified by sending a message to a callback function. The dwCallback parameter specifies a procedure-instance address.
DCB_WINDOW The application is notified by sending a message to a window. The low-order word of the dwCallback parameter specifies a window handle.
DCB_TASK The application is notified by sending a message to the application or task. The low-order word of the dwCallback parameter specifies a task handle.

HANDLE hDevice
Specifies a handle to the device associated with the notification. This is the handle assigned by MMSYSTEM when the device was opened.
UINT uMsg
Specifies a message to send to the application.
DWORD dwUser
Specifies the DWORD of user instance data supplied by the application when the device was opened.
DWORD dwParam1
Specifies a message-dependent parameter.
DWORD dwParam2
Specifies a message-dependent parameter.

This function can be called at interrupt time.

The client specifies how it wants to be notified when it opens the device. The flags DCB_FUNCTION and DCB_WINDOW are equivalent to the high-order word of the corresponding flags CALLBACK_FUNCTION and CALLBACK_WINDOW specified in the dwParam2 parameter of the _OPEN message when the device was opened.

If notification is done with a callback function, hDevice, uMsg, dwUser, dwParam1, and dwParam2 are passed to the callback. If notification is done with a window, only uMsg, hDevice, and dwParam1 are passed to the window.