In addition to indicating the members used in a structure, flags can indicate an option that does not use any parameters. For example, the wait flag does not use any parameters.
When you add new flags, you must ensure they do not conflict with the flags already used. Bits 0 through 15 of the 32-bit DWORD are reserved for MCI. Bit 16 (0x00010000) is the first bit that a driver can use for its flags. If your command is a new command, you can start with this bit position. If your command extends a command, you must choose bit positions that do not conflict with the flags already defined for that command. Any unused bits in the new flag must be set to zero. For example, if a new command for videodisc players uses flags 16 through 20, a custom extension to the new command could use flags 21 through 31.
To continue the example for adding a "reset" command to a videodisc driver, the following code fragment defines a structure, a corresponding pointer for it, and the flag corresponding to the program member of the structure:
typedef struct {
DWORD dwCallback;
DWORD dwProgram;
} MCI_VDISC_RESET_PARMS;
typedef MCI_VDISC_RESET_PARMS FAR * LPMCI_VDISC_RESET_PARMS;
#define MCI_VDISC_RESET_PROGRAM 0x00010000L
When the application sets the MCI_VDISC_RESET_PROGRAM flag in lParam1, it indicates that a value is assigned in the dwProgram member.
Now that you have created the message command, flags and structure, you need to create the command table that tells MCI how to translate the equivalent string command into the message command form. Creating the command table is explained in the following section.