All MCDs have commands passed to them in the same way, regardless of whether they support streaming or nonstreaming devices. Applications call either the mciSendCommand or mciSendString functions to pass commands to the entry point, mciDriverEntry. In addition, some commands are generated by the MDM itself. These are the commands for saving and restoring an instance.
The following table shows the parameters associated with mciDriverEntry.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Parameters ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³PVOID pInstance ³Pointer to instance structure of ³ ³ ³driver. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³USHORT usMessage ³The requested action to be ³ ³ ³performed. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ULONG ulParam1 ³Flag for the message. This flag is³ ³ ³defined separately for each ³ ³ ³message. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³PVOID pParam2 ³Second data parameter, whose ³ ³ ³interpretation is dependent on the ³ ³ ³message. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³USHORT usUserParm ³User parameter returned on ³ ³ ³notification message. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The function of mciDriverEntry is to switch, based on the message, and perform the appropriate task. An example of a message is MCI_OPEN.
Your driver must be able to handle messages in the following fashion:
For example, if you are writing an MCD for a videodisc player, you must parse the videodisc-specific messages.
CD-ROM/XA
CD Audio
Wave Audio
Sequencer
Digital Video
Amp Mixer
Videodisc
If your driver is for a device type other than the device types listed, you must create a command table that includes both the device-type messages and the device-specific messages.