Suppose you want to define a new reset command for an MCD supporting a videodisc player. You can call this command by sending a reset program_number string. The command sets all player parameters to their default settings or one of several predefined states indicated by the program_number.

You would add the following message to the list of messages you must support in mciDriverEntry:

#define MCI_VD_RESET MCI_USER_MESSAGES

MCI_USER_MESSAGES is the first integer you can use for custom messages. Since the resource compiler does not accept mathematical expressions in the RCDATA resource type, you must indicate the specific value you want to use.

Now that you have defined the message ID, you must define the data structure and the command table, and create the code to handle this message in mciDriverEntry.


[Back] [Next]