mciGetDeviceID

  MCIDEVICEID mciGetDeviceID(lpstrName)    
  LPSTR lpstrName;    

The mciGetDeviceID function retrieves the device ID corresponding to the name of an opened device.

Parameters

lpstrName

Points to the device name from SYSTEM.INI, or the alias name by which the device is known.

Return Value

Returns the device ID assigned when it was opened and used in the mciSendCommand function. Returns zero if the device name was not known,if the device was not open, or if there was not enough memory to complete the operation. Each compound device element has a unique device ID. The ID of the “all” device is MCI_ALL_DEVICE_ID