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.
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 to receive this message is specified in the dwCallback member of the structure identified by lpSet. |
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 member of the structure identified by lpSet. 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. |
MCI_SET_AUDIO_LEFT | Specifies the left channel. |
MCI_SET_AUDIO_RIGHT | Specifies the right channel. |
MCI_SET_DOOR_CLOSED | Instructs the device to close the media cover (if any). |
MCI_SET_DOOR_OPEN | Instructs the device to open the media cover (if any). |
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lpSet. Specifying MCI_FORMAT_MILLISECONDS indicates that subsequent commands that specify time will use milliseconds for both input and output. Other units are device dependent. |
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. |
LPMCI_SET_PARMS lParam2
Specifies a far pointer to the MCI_SET_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)
Animation Extensions
The following additional flags for lParam1apply to animation devices:
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lParam2. The following constants are defined for the time format: |
MCI_FORMAT_MILLISECONDS | Changes the time format to milliseconds. |
MCI_FORMAT_FRAMES | Changes the time format to frames. |
Note that lParam2 specifies a far pointer to the MCI_SET_PARMS structure.
CD Audio Extensions
The following additional flags for lParam1 apply to videodisc devices:
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lParam2. The following constants are defined for the time format: |
MCI_FORMAT_MILLISECONDS | Changes the time format to milliseconds. |
MCI_FORMAT_MSF | Changes the time format to minutes, seconds, and frames. |
MCI_FORMAT_TMSF | Changes the time format to tracks, minutes, seconds, and frames. (MCI uses continuous track numbers.) |
Note that lParam2 specifies a far pointer to the MCI_SET_PARMS structure.
MIDI Sequencer Extensions
The following additional flags for lParam1 apply to MIDI sequencer devices:
MCI_SEQ_SET_MASTER | Sets the sequencer as a source of synchronization data and indicates that the type of synchronization is specified in the dwMaster member of the structure identified by lParam2. MCISEQ returns MCIERR_UNSUPPORTED_FUNCTION. The following constants are defined for the synchronization type: |
MCI_SEQ_MIDI | The sequencer will send MIDI format synchronization data. |
MCI_SEQ_SMPTE | The sequencer will send SMPTE format synchronization data. |
MCI_SEQ_NONE | The sequencer will not send synchronization data. |
MCI_SEQ_SET_OFFSET | Changes the SMPTE offset of a sequence to that specified by the dwOffset member of the structure identified by lParam2. This only affects sequences with a SMPTE division type. |
MCI_SEQ_SET_PORT | Sets the output MIDI port of a sequence to that specified by the MIDI device ID in the dwPort member of the structure identified by lParam2. The device will close the previous port (if any), and attempt to open and use the new port. If it fails, it will return an error and re-open the previously used port (if any). The following constants are defined for the ports: |
MCI_SEQ_NONE | Closes the previously used port (if any). The sequencer will behave exactly the same as if a port were open, except no MIDI message will be sent. |
MIDI_MAPPER | Sets the port opened to the MIDI Mapper. |
MCI_SEQ_SET_SLAVE | Sets the sequencer to receive synchronization data and indicates that the type of synchronization is specified in the dwSlave member of the structure identified by lParam2.MCISEQ returns MCIERR_UNSUPPORTED_FUNCTION.The following constants are defined for the synchronization type: |
MCI_SEQ_FILE | Sets the sequencer to receive synchronization data contained in the MIDI file. |
MCI_SEQ_SMPTE | Sets the sequencer to receive SMPTE synchronization data. |
MCI_SEQ_MIDI | Sets the sequencer to receive MIDI synchronization data. |
MCI_SEQ_NONE | Sets the sequencer to ignore synchronization data in a MIDI stream. |
MCI_SEQ_SET_TEMPO | Changes the tempo of the MIDI sequence to that specified by the dwTempo member of the structure pointed to by lParam2. For sequences with division type PPQN, tempo is specified in beats per minute; for sequences with division type SMPTE, tempo is specified in frames per second. |
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lParam2. The following constants are defined for the time format: |
MCI_FORMAT_MILLISECONDS | Changes the time format to milliseconds for both input and output. |
MCI_FORMAT_SMPTE_24 | Sets the time format to 24 frame SMPTE. |
MCI_FORMAT_SMPTE_25 | Sets the time format to 25 frame SMPTE. |
MCI_FORMAT_SMPTE_30 | Sets the time format to 30 frame SMPTE. |
MCI_FORMAT_SMPTE_30DROP | Sets the time format to 30 drop-frame SMPTE. |
MCI_SEQ_FORMAT_SONGPTR | Sets the time format to song-pointer units. |
Note that lParam2 specifies a far pointer to the MCI_SEQ_SET_PARMS structure.
Videodisc Extensions
The following additional flags for lParam1 apply to videodisc devices:
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lParam2. The following constants are defined for the time format: |
MCI_FORMAT_CHAPTERS | Changes the time format to chapters. |
MCI_FORMAT_FRAMES | Changes the time format to frames. |
MCI_FORMAT_HMS | Changes the time format to hours, minutes, and seconds. |
MCI_FORMAT_MILLISECONDS | Changes the time format to milliseconds for both input and output. |
MCI_VD_FORMAT_TRACK | Changes the time format to tracks. MCI uses continuous track numbers. |
Note that lParam2specifies a far pointer to the MCI_VD_SET_PARMS structure. (Devices with additional parameters might replace this structure with a device-specific structure.)
Waveform Audio Extensions
The following additional flags for lParam1 apply to waveform audio devices:
MCI_WAVE_INPUT | Sets the input used for recording to the wInput member of the structure identified by lParam2. |
MCI_WAVE_OUTPUT | Sets the output used for playing to the wOutput member of the structure identified by lParam2. |
MCI_WAVE_SET_ANYINPUT | Specifies that any wave input compatible with the current format can be used for recording. |
MCI_WAVE_SET_ANYOUTPUT | Specifies that any wave output compatible with the current format can be used for playing. |
MCI_WAVE_SET_AVGBYTESPERSEC | Sets the bytes per second used for playing, recording, and saving to the nAvgBytesPerSec member of the structure identified by lParam2. |
MCI_WAVE_SET_BITSPERSAMPLE | Sets the bits per sample used for playing, recording, and saving to the nBitsPerSample member of the structure identified by lParam2. |
MCI_WAVE_SET_BLOCKALIGN | Sets the block alignment used for playing, recording, and saving to the nBlockAlign member of the structure identified by lParam2. |
MCI_WAVE_SET_CHANNELS | Specifies the number of channels is indicated in the nChannels member of the structure identified by lParam2. |
MCI_WAVE_SET_FORMATTAG | Sets the format type used for playing, recording, and saving to the wFormatTag member of the structure identified by lParam2. Specifying WAVE_FORMAT_PCM changes the format to PCM. |
MCI_WAVE_SET_SAMPLESPERSEC | Sets the samples per second used for playing, recording, and saving to the nSamplesPerSec member of the structure identified by lParam2. |
MCI_SET_TIME_FORMAT | Specifies a time format parameter is included in the dwTimeFormat member of the structure identified by lParam2. The following constants are defined for the time format: |
MCI_FORMAT_BYTES | Changes the time format to bytes for input or output. |
MCI_FORMAT_MILLISECONDS | Changes the time format to milliseconds for input or output. |
MCI_FORMAT_SAMPLES | Changes the time format to samples for input or output. |
Note that lParam2specifies a far pointer to the MCI_WAVE_SET_PARMS structure. This parameter replaces the standard default parameter structure identified by lParam2.