Referencing Command Structures
Drivers should obey the following rules when referencing command data structures:
·Test for null structure pointers. For some commands, it is acceptable for an application to send the command without the structure. For example, if an application sends the "play" command without modifiers, it does not need the structure.
·Before referencing a structure's input members, check the lParam1 argument to DriverProc to see if the member's flag is set. Data in the structure member is only valid if the approriate flag has been set. Following is an example:
if (lparam1 & MCI_FROM)
dwFrom = lparam2->dwFrom;