MCI_SET

This MCI command message sets device information. Support of this message by a device is optional. The parameters and flags for this message vary according to the selected device.

Parameters

DWORD lParam1

The following flags apply to all devices supporting MCI_SET:


MCI_NOTIFY

Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window that receives this message is specified in the dwCallback field of the data structure identified by lParam2.

MCI_TEST

Queries the device to determine if it can execute the command. The device returns an error if it is incapable of executing the command. It returns no error if it can handle the command. MCI returns control to the application without executing the command.

MCI_WAIT

Specifies that the set operation should finish before MCI returns control to the application.

MCI_SET_AUDIO

Specifies an audio channel number is included in the dwAudio field of the data structure identified by lParam2. This flag must be used with MCI_SET_ON or MCI_SET_OFF. Use one of the following constants to indicate the channel number:


MCI_SET_AUDIO_ALL

Specifies all audio channels. This constant affects the left and right audio channel simultaneously.

MCI_SET_AUDIO_LEFT

Specifies the left channel.

MCI_SET_AUDIO_RIGHT

Specifies the right channel.

For digital-video devices, the audio presentation source might be either the external input or the workspace. While digital-video devices should use the MCI_SETAUDIO commands to control audio, they still must support this flag. The default value for audio after an open is all on.


MCI_SET_DOOR_CLOSED

Instructs the device to close the media cover (if any). Digital-video devices return MCIERR_UNSUPPORTED_FUNCTION.

MCI_SET_DOOR_OPEN

Instructs the device to open the media cover (if any). Digital-video devices return MCIERR_UNSUPPORTED_FUNCTION.

MCI_SET_TIME_FORMAT

Specifies a time format parameter is included in the dwTimeFormat field of the data structure identified by lParam2. Specifying MCI_FORMAT_FRAMES in dwTimeFormat indicates that subsequent commands will use frames for the units. Digital-video devices use a default format of frames and might not support other formats. Constants defined for time formats include:


MCI_FORMAT_FRAMES

Specifies frames.

MCI_FORMAT_MILLISECONDS

Specifies milliseconds.


MCI_SET_VIDEO

Sets the video signal on or off. This flag must be used with either MCI_SET_ON or MCI_SET_OFF. Devices that do not have video return MCIERR_UNSUPPORTED_FUNCTION.

MCI_SET_ON

Enables the specified video or audio channel.

MCI_SET_OFF

Disables the specified video or audio channel.