Default and Specific Devices

The following table shows some examples of open commands. A default device is opened if only a logical device type (for example, waveaudio) is specified in the open command. The default device for a logical device type can be queried and set by the user with the Multimedia Setup application. The default device also can be queried and set with MCI_SYSINFO by an installation DLL for a media device.

A specific device is opened by specifying its name (for example waveaudio01), or by specifying a device element with an extension or .TYPE EA that is associated with the device.

┌────────────────────────┬────────────────────────────────────┐
│Open Command            │Description                         │
├────────────────────────┼────────────────────────────────────┤
│open waveaudio          │Opens a default device of type      │
│                        │waveaudio.                          │
├────────────────────────┼────────────────────────────────────┤
│open waveaudio01        │Opens a specific device of type     │
│                        │waveaudio.                          │
├────────────────────────┼────────────────────────────────────┤
│open foo.xyz            │Opens a specific device that is     │
│                        │associated with the .TYPE EA (if    │
│                        │any) of foo.xyz; otherwise opens a  │
│                        │specific device that has a unique   │
│                        │association with file extension xyz;│
│                        │otherwise returns                   │
│                        │MCIERR_INVALID_DEVICE_NAME.         │
└────────────────────────┴────────────────────────────────────┘


[Back: File Type Associations]
[Next: Shareable Flag]