SetupDiGetDeviceInfoListDetail function

The SetupDiGetDeviceInfoListDetail function retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.

Syntax


BOOL SetupDiGetDeviceInfoListDetail(
  _In_  HDEVINFO                     DeviceInfoSet,
  _Out_ PSP_DEVINFO_LIST_DETAIL_DATA DeviceInfoSetDetailData
);

Parameters

DeviceInfoSet [in]

A handle to the device information set for which to retrieve information.

DeviceInfoSetDetailData [out]

A pointer to a caller-initialized SP_DEVINFO_LIST_DETAIL_DATA structure that receives the device information set information. For more information about this structure, see the following Remarks section.

Return value

The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved by making a call to GetLastError.

Remarks

If the parameters are valid, SetupDiGetDeviceInfoListDetail sets values in the DeviceInfoSetDetailData structure (except for the cbSize field) and returns status NO_ERROR.

A caller of SetupDiGetDeviceInfoListDetail must set DeviceInfoSetDetailData.cbSize to sizeof(SP_DEVINFO_LIST_DETAIL_DATA) or the function will fail and the call to GetLastError will return ERROR_INVALID_USER_BUFFER.

If SetupDiGetDeviceInfoListDetail completes successfully, DeviceInfoSetDetailData.ClassGuid contains the class GUID associated with the device information set or a GUID_NULL structure.

If SetupDiGetDeviceInfoListDetail completes successfully and the device information set is for a remote system, DeviceInfoSetDetailData.RemoteMachineHandle contains the ConfigMgr32 system handle for accessing the remote system and DeviceInfoSetDetailData.RemoteMachineName contains the name of the remote system. If there is a remote handle for the device information set, it must be used when calling CM_Xxx_Ex functions because the DevInst handles are relative to the remote handle.

If the device information set is for the local computer, DeviceInfoSetDetailData.RemoteMachineHandle is NULL and DeviceInfoSetDetailData.RemoteMachineName is an empty string.

Requirements

Target platform

Desktop

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

See also

SetupDiCreateDeviceInfoListEx
SetupDiGetClassDevsEx
SetupDiGetDeviceInfoListClass

 

 

Send comments about this topic to Microsoft

Show: