BOOL APIENTRY
DriverCallback(
DWORD dwCallBack,
DWORD dwFlags,
HDRVR hDriver,
DWORD dwMsg,
DWORD dwInstance,
DWORD dwParam1,
DWORD dwParam2
);
The DriverCallback function is used by user-mode drivers to send a callback message to a client application.
The application specifies the type of callback target when opening a driver
instance. The dwFlags parameter indicates the type of value stored in dwCallback.
DCB_EVENT |
Equivalent to HIWORD(CALLBACK_EVENT). Indicates dwCallback contains an event handle. Code in winmm.dll calls the Win32 SetEvent function. |
DCB_FUNCTION |
Equivalent to HIWORD(CALLBACK_FUNCTION). Indicates dwCallback contains a function address. Code in winmm.dll calls the function. |
DCB_TASK |
Equivalent to HIWORD(CALLBACK_THREAD). Indicates dwCallback contains a thread identifer. Code in winmm.dll calls the Win32 PostThreadMessage function to post a WM_USER message. |
DCB_WINDOW |
Equivalent to HIWORD(CALLBACK_WINDOW). Indicates dwCallback contains a window handle. Code in winmm.dll calls the Win32 PostMessage function. |
The CALLBACK_EVENT, CALLBACK_FUNCTION, CALLBACK_THREAD, and CALLBACK_WINDOW
flags, referred to in the preceding table, are longword values used by
applications when calling Win32 API functions that open multimedia drivers,
such as midiOutOpen, waveOutOpen, or videoStreamInit.
Returns FALSE if dwCallback is NULL, if dwFlags is invalid, or if the message cannot be queued. Otherwise returns TRUE.
User-mode drivers call the DriverCallback function to deliver callback messages to applications that have requested them. Applications request delivery of callback messages by specifying a callback target when they open a driver instance. Win32 API functions that allow applications to specify a callback target include midiOutOpen, waveOutOpen, videoStreamInit, and others.