Compartir a través de


mciGetDeviceIDFromElementID function

The mciGetDeviceIDFromElementID function retrieves the MCI device identifier corresponding to an element identifier.

Syntax

MCIDEVICEID mciGetDeviceIDFromElementID(
   DWORD   dwElementID,
   LPCTSTR lpstrType
);

Parameters

  • dwElementID
    The element identifier.

  • lpstrType
    Pointer to a null-terminated string specifying the type name that corresponds to dwElementID.

Return value

Returns the device identifier assigned to the device when it was opened if successful. The identifier is used in the mciSendCommand function. If the element ID is not known, if the value of lpstrType is NULL, if the device is not open, or if there was not enough memory to complete the operation, the return value is zero.

Remarks

Each file for a compound device has a unique device identifier. The identifier of the "all" device is MCI_ALL_DEVICE_ID.

For UNICODE, this method calls mciGetDeviceIDFromElementIDW, which defines the parameter lpstrType as type LPCWSTR.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

Unicode and ANSI names

mciGetDeviceIDFromElementIDW (Unicode) and mciGetDeviceIDFromElementIDA (ANSI)

See also

MCI

MCI Functions