Partager via


CM_Get_Device_Interface_List_SizeW(PULONG,LPGUID,DEVINSTID_W,ULONG) function

[CM_Get_Device_Interfac e_List_SizeW 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_List_SizeW function retrieves the size of the buffer required to store the list of interface devices for the specified interface class. This function is typically called before calling the CM_Get_Device_Interface_ListW function.

DWORD CM_Get_Device_Interface_List_SizeW(
  PULONG pulLen,
  LPGUID InterfaceClassGuid,
  DEVINSTID_W pDeviceID,
  ULONG ulFlags
);

Parameters

  • pulLen
    [out] Pointer to a variable that receives the required buffer size, in characters.

  • 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.

  • 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_INVALID_FLAG
CR_INVALID_POINTER
CR_REGISTRY_ERROR

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_ListW
Device Management Functions
SetupDiGetClassDevs