The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

cue command

The cue command prepares for playing or recording. Digital-video, VCR, and waveform-audio devices recognize this command.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.

  TEXT("cue %s %s %s"), 



Identifier of an MCI device. This identifier or alias is assigned when the device is opened.


Flag that prepares a device for playing or recording. The following table lists device types that recognize the cue command and the flags used by each type.

  • input
  • noshow
  • output
  • to position
  • from position
  • input
  • output
  • preroll
  • reverse
  • to position


The following table lists the flags that can be specified in the lpszInOutTo parameter and their meanings.

from positionIndicates where to start.
inputPrepares for recording. For digital-video devices, this flag can be omitted if the current presentation source is already the external input.
noshowPrepares for playing a frame without displaying it. When this flag is specified, the display continues to show the image in the frame buffer even though its corresponding frame is not the current position. A subsequent cue command without this flag and without the "to" flag displays the current frame.
outputPrepares for playing. If neither "input" nor "output" is specified, the default setting is "output".
prerollMoves the preroll distance from the in-point. The in-point is the current position, or the position specified by the "from" flag.
reverseIndicates play direction is in reverse (backward).
to positionMoves the workspace to the specified position. For VCR devices, this flag indicates where to stop.



Can be "wait", "notify", or both. For digital-video and VCR devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Value

Returns zero if successful or an error otherwise.


Although it is not necessary, issuing the cue command before playing or recording on some devices might reduce the delay before the device starts the action.

This command fails if playing or recording is in progress or if the device is paused.

When cueing for playback (using cue "output"), issuing the play command with the "from", "to", or "reverse" flag cancels the cue command.

When cueing for recording (using cue "input"), issuing the record command with the "from", "to", or "initialize" flag cancels the cue command.


The following command prepares the "mysound" device for recording.

cue mysound input


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

MCI Command Strings