Information
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.

capability command

The capability command requests information about a particular capability of a device. All MCI devices recognize this command.

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


_stprintf_s(
  lpszCommand, 
  TEXT("capability %s %s %s"), 
  lpszDeviceID, 
  lpszRequest, 
  lpszFlags
); 

Parameters

lpszDeviceID

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

lpszRequest

Flag that identifies a device capability. The following table lists device types that recognize the capability command and the flags used by each type:

ValueTypeType
cdaudio
  • can eject
  • can play
  • can record
  • can save
  • compound device
  • device type
  • has audio
  • has video
  • uses files
digitalvideo
  • can eject
  • can freeze
  • can lock
  • can play
  • can record
  • can reverse
  • can save
  • can stretch
  • can stretch input
  • can test
  • compound device
  • device type
  • has audio
  • has still
  • has video
  • maximum play rate
  • minimum play rate
  • uses files
  • uses palettes
  • windows
overlay
  • can eject
  • can freeze
  • can play
  • can record
  • can save
  • can stretch
  • compound device
  • device type
  • has audio
  • has video
  • uses files
  • windows
sequencer
  • can eject
  • can play
  • can record
  • can save
  • compound device
  • device type
  • has audio
  • has video
  • uses files
vcr
  • can detect length
  • can eject
  • can freeze
  • can monitor sources
  • can play
  • can preroll
  • can preview
  • can record
  • can reverse
  • can save
  • can test
  • clock increment rate
  • compound device
  • device type
  • has audio
  • has clock
  • has timecode
  • has video
  • number of marks
  • seek accuracy
  • uses files
videodisc
  • can eject
  • can play
  • can record
  • can reverse
  • can save
  • CAV
  • CLV
  • compound device
  • device type
  • fast play rate
  • has audio
  • has video
  • normal play rate
  • slow play rate
  • uses files
waveaudio
  • can eject
  • can play
  • can record
  • can save
  • compound device
  • device type
  • has audio
  • has video
  • inputs
  • outputs
  • uses files

 

The following table lists the flags that can be specified in the lpszRequest parameter and their meanings:

FlagsMeaning
can detect lengthReturns TRUE if the device can detect the length of the media.
can ejectReturns TRUE if the device can eject the media.
can freezeReturns TRUE if the device can freeze data in the frame buffer.
can lockReturns TRUE if the device can lock data.
can monitor sourcesReturns TRUE if the device can pass an input (source) to the monitored output, independent of the current input selection.
can playReturns TRUE if the device can play.
can prerollReturns TRUE if the device supports the "preroll" flag with the cue command.
can previewReturns TRUE if the device supports previews.
can recordReturns TRUE if the device supports recording.
can reverseReturns TRUE if the device can play in reverse.
can saveReturns TRUE if the device can save data.
can stretchReturns TRUE if the device can stretch frames to fill a given display rectangle.
can stretch inputReturns TRUE if the device can resize an image in the process of digitizing it into the frame buffer.
can testReturns TRUE if the device recognizes the test keyword.
cavWhen combined with other items, this flag specifies that the return information applies to CAV format videodiscs. This is the default if no videodisc is inserted.
clock increment rateReturns the number of subdivisions the external clock supports per second. If the external clock is a millisecond clock, the return value is 1000. If the return value is 0, no clock is supported.
clvWhen combined with other items, this flag specifies that the return information applies to CLV format videodiscs.
compound deviceReturns TRUE if the device supports an element name (filename).
device typeReturns a device type name, which can be one of the following:
  • cdaudio
  • dat
  • digitalvideo
  • other
  • overlay
  • scanner
  • sequencer
  • vcr
  • videodisc
  • waveaudio
fast play rateReturns the fast play rate in frames per second, or zero if the device cannot play fast.
has audioReturns TRUE if the device supports audio playback.
has clockReturns TRUE if the device has a clock.
has stillReturns TRUE if the device treats files with a single image more efficiently than motion video files.
has timecodeReturns TRUE if the device is capable of supporting timecode, or if it is unknown.
has videoReturns TRUE if the device supports video.
inputsReturns the total number of input devices.
maximum play rateReturns the maximum play rate, in frames per second, for the device.
minimum play rateReturns the minimum play rate, in frames per second, for the device.
normal play rateReturns the normal play rate, in frames per second, for the device.
number of marksReturns the maximum number of marks that can be used; zero indicates that marks are unsupported.
outputsReturns the total number of output devices.
seek accuracyReturns the expected accuracy of a search in frames; 0 indicates that the device is frame accurate, 1 indicates that the device expects to be within one frame of the indicated seek position, and so on.
slow play rateReturns the slow play rate in frames per second, or zero if the device cannot play slowly.
uses filesReturns TRUE if the data storage used by a compound device is a file.
uses palettesReturns TRUE if the device uses palettes.
windowsReturns the number of simultaneous display windows the device can support.

 

lpszFlags

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 information in the lpszReturnString parameter of the mciSendString function. The information is dependent on the request type.

Examples

The following command returns the device type of the "mysound" device.

capability mysound device type

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

MCI
MCI Command Strings
cue

 

 

Show: