LRESULT WINAPI
DefDriverProc (
DWORD dwDriverID,
HDRVR hDriver,
UINT uMsg,
LPARAM lParam1,
LPARAM lParam2
);
The DefDriverProc function is called by user-mode multimedia drivers to handle messages not processed by the driver’s DriverProc function. The function is defined in winmm.dll.
Parameters
dwDriverID
Value passed to the driver as the dwDriverID argument to DriverProc.
hDriver
Value passed to the driver as the hDriver argument to DriverProc.
uMsg
Value passed to the driver as the uMsg argument to DriverProc.
lParam1
Value passed to the driver as the lParam1 argument to DriverProc.
lParam2
Value passed to the driver as the lParam2 argument to DriverProc.
Return Value
The DefDriverProc function returns a value that is based on the received message. Return values are shown in the following table.
Message | Return Value |
DRV_LOAD | 1 |
DRV_FREE | 1 |
DRV_ENABLE | 1 |
DRV_DISABLE | 1 |
DRV_INSTALL | DRV_OK |
DRV_REMOVE | DRV_OK |
All other messages. | 0 |
Comments
A user-mode driver calls DefDriverProc by passing it the same arguments the driver received as input to its DriverProc function.
Typically, a user-mode driver’s DriverProc function assigns supported uMsg values to C-language case statement arguments, and associates DefDriverProc with a default statement. Refer to the sample drivers for examples. The value returned from DefDriverProc should be used as the return value for DriverProc.