Device Alias

When a device is opened, it can be given an alias, or alternate name. The primary use of a device alias is to simplify the specifying of subsequent commands to control the device through the string interface. A device alias is referenced only from the string interface, and it is valid only within the process that opened the device context.

For example, the following strings can be passed with mciSendString:

open horns.wav alias honk
play honk

A secondary use of the device alias is to differentiate between device contexts opened by the same process. For example:

open horns.wav alias honk
open bells.wav alias ring
play ring wait
play honk wait

Note: The maximum length for an alias is 20 characters. Placing an alias in quotation marks is permitted.