MCI Driver Entry Point

MCI uses the DriverProc entry point to handle its messages for MCI services. MCI augments the messages needed by the system to install, initialize, and configure the driver with MCI specific messages. This chapter contains a description of the messages added by MCI. While this chapter will reference the messages used by the system, it will only reference them in relation to the MCI messages. The Microsoft Windows Software Development Kit provides the complete definition and use of the messages used by the system.

The DriverProc entry point has the following syntax:

LRESULT WINAPI DriverProc(DWORD dwDriverID, 
    HDRVR hDriver, 
    UINT uMsg,
    LPARAM lParam1,
    LPARAM lParam2)
 

MCI drivers use the following definitions for the parameters of this entry point:

Parameter Definition
dwDriverID Contains the driver ID created by the device driver in the low-order word.
hDriver Contains a handle to the device driver
uMsg Contains the joystick message
lParam1 Contains message-dependent data. Most messages define flags for this parameter.
lParam2 Contains message-dependent data. Most messages define structures for this parameter

When you add this entry point to your device driver, remember that you must export it. For more information on the DriverProc entry point and the system messages it handles, see the description of installable device drivers in the Microsoft Windows Software Development Kit.