CM_Get_Device_Interface_ListW(LPGUID,DEVINSTID_W,PWCHAR,ULONG,ULONG) function

[CM_Get_Device_Interface_ListW is available for use in Windows 2000 and Windows XP. It may be altered or unavailable in subsequent versions. Applications should use the SetupDiGetClassDevs function.]

The CM_Get_Device_Interface_ListW function retrieves a list of interface devices in the specified device interface class.

DWORD CM_Get_Device_Interface_ListW(
  LPGUID InterfaceClassGuid,
  DEVINSTID_W pDeviceID,
  PWCHAR Buffer,
  ULONG BufferLen,
  ULONG ulFlags
);

Parameters

  • InterfaceClassGuid
    [in] Pointer to a GUID that specifies the device interface class.

  • pDeviceID
    [in] Name of the device instance. This parameter is optional. If it is nonzero, only the devices associated with this device instance are retrieved.

  • Buffer
    [out] Pointer to a buffer that receives the MULTI_SZ list of interface devices.

  • BufferLen
    [in] Size of the buffer, in characters.

  • ulFlags
    [in] Must be one of the following values:

    CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES
    CM_GET_DEVICE_INTERFACE_LIST_PRESENT

Return Value

If the function succeeds, the return value is CR_SUCCESS. Otherwise, the return value is one of the following error codes:

CR_BUFFER_SMALL
CR_INVALID_FLAG
CR_INVALID_POINTER
CR_REGISTRY_ERROR

Remarks

To determine the required buffer size, call the CM_Get_Device_Interface_List_SizeW function.

Requirements

Client Requires Windows XP or Windows 2000 Professional.
Server Requires Windows Server 2003 or Windows 2000 Server.
Header

Declared in Cfgmgr32.h.

Library

Use Setupapi.lib.

DLL Requires Setupapi.dll.

See Also

CM_Get_Device_Interface_List_SizeW
Device Management Functions
SetupDiGetClassDevs