Rediger

Del via


sysinfo command

The sysinfo command retrieves MCI system information. The sysinfo command is an MCI system command; it is interpreted directly by MCI.

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

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

Parameters

lpszDeviceID

Identifier of an MCI device or device type. If a device type is specified, it must be a standard MCI device-type name, as listed in the reference material for the capability command. You can specify "all" when the flag specified in lpszRequest allows that possibility.

lpszRequest

One of the following flags.

Value Meaning
installname
Returns the name listed in the registry or the SYSTEM.INI file used to install the open device with the specified device identifier.
quantity
Returns the number of MCI devices listed in the registry or the SYSTEM.INI file of the type specified in the lpszDeviceID parameter. This device identifier must be a standard MCI device-type name. Any digits after the device type are ignored. Specifying "all" for lpszDeviceID returns the total number of MCI devices in the system.
quantity open
Returns the number of open MCI devices of the type specified in lpszDeviceID. This device identifier must be a standard MCI device-type name. Specifying "all" for lpszDeviceID returns the total number of open MCI devices in the system.
name index
Returns the name of an MCI device. The device identifier must be a standard MCI device-type name. The index ranges from 1 to the number of devices of that type. If "all" is specified for lpszDeviceID, index ranges from 1 to the total number of devices in the system.
name index open
Returns the name of an open MCI device. The device identifier must be a standard MCI device-type name. The index ranges from 1 to the number of open devices of that device type. If "all" is specified for lpszDeviceID, index ranges from 1 to the total number of open devices in the system.

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.

Examples

The following command returns the number of open waveform-audio devices.

sysinfo waveaudio quantity open

The following command returns the name (device alias) of the first open waveform-audio device.

sysinfo waveaudio name 1 open

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]

See also

MCI

MCI Command Strings

capability