Define the New Messages for Your Driver

Suppose you are writing a driver for a videodisc player and this player supports a new command “reset.” This command is invoked by the string “reset program_number.” 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 DriverProc:

#defineMCI_VDISC_RESET1000

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 DriverProc.