Wait, Notify, and Test
MCI supports the command flags wait and notify on every command. While these flags are not explicitly listed with the commands, they are always accepted. Wait and notify implement two different strategies for handling with delays associated with time consuming commands.
The digital-video MCI command set adds the test flag that you can use with all commands except open and close. When this flag is used, the device checks if it can execute the associated command. 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.
Applications can use the test flag to determine and adapt to the subtle differences among the digital-video devices. For example, some devices do not disable audio with setaudio off when recording while other devices can disable it. An application might also use test to determine which capabilities are temporarily not available and dim buttons and menu entries accordingly.
To improve the transition to future versions of MCI that include more extensive use of test, the digitalvideo device class also adds the capability can test command.