Adding New MCI Commands

This section applies to your driver only if you need to add new MCI commands or provide extensions to the MCI command set. Do the following to add or extend a command set:

  1. Define the new MCI messages you plan to support with your driver.
  2. Define new structures and flags for this command to use with mciSendCommand.

    MCI messages use lParam2 as a pointer to a structure, and use lParam1 as a bitmember for the flags associated with the message. A flag exists for each member in the structure that accepts data from the calling application. The application sets the flag in the bitmember of lParam1 to indicate a value is assigned to a particular member. Flags also specify options without parameters and these flags do not correspond to a member in the structure.

  3. Create a command table that MCI will use to translate string commands sent through mciSendString into the command messages and structures used by your driver.
  4. Support the new messages in your driver's DriverProc.
  5. Register the new command table with MCI in your driver's DRV_LOAD procedure.