Responding to the Test Flag

The MCI_TEST flag lets applications interrogate your driver to determine if it can execute a command and its flags. Applications can add this flag to any MCI command except MCI_OPEN and MCI_CLOSE. If the device driver determines that it can execute the command, it exits without processing the command and without returning an error. If an application supplies a return buffer for a command that returns data, the device returns 0 for integer return values and an empty string for string return values. If the device cannot handle the command, it returns a suitable error.

If a device cannot execute the command because the requested function is not supported, the device should return MCIERR_UNSUPPORTED_FUNCTION for the error. If the device supports a command but it cannot execute it because the device is not in a suitable state, the device should return the error MCIERR_NONAPPLICABLE_FUNCTION.