Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 4.99 KB

nf-setupapi-setupdicreatedeviceinfolistexa.md

File metadata and controls

105 lines (73 loc) · 4.99 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:setupapi.SetupDiCreateDeviceInfoListExA
SetupDiCreateDeviceInfoListExA function (setupapi.h)
The SetupDiCreateDeviceInfoList function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class . (ANSI)
SetupDiCreateDeviceInfoListExA
di-rtns_584dc470-c07f-4658-b16d-53a2594dabf9.xml
devinst\setupdicreatedeviceinfolistex.htm
devinst
4dae7b07-2e24-4fd8-82f2-f947296ce3c4
01/30/2023
SetupDiCreateDeviceInfoListEx, SetupDiCreateDeviceInfoListEx function [Device and Driver Installation], SetupDiCreateDeviceInfoListExA, SetupDiCreateDeviceInfoListExW, devinst.setupdicreatedeviceinfolistex, di-rtns_584dc470-c07f-4658-b16d-53a2594dabf9.xml, setupapi/SetupDiCreateDeviceInfoListEx
setupapi.h
Setupapi.h
Desktop
Available in Microsoft Windows 2000 and later versions of Windows.
Setupapi.lib
Windows
19H1
SetupDiCreateDeviceInfoListExA
setupapi/SetupDiCreateDeviceInfoListExA
c++
APIRef
kbSyntax
LibDef
Setupapi.lib
Setupapi.dll
SetupDiCreateDeviceInfoListEx
SetupDiCreateDeviceInfoListExA

SetupDiCreateDeviceInfoListExA function

-description

The SetupDiCreateDeviceInfoList function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class .

-parameters

-param ClassGuid [in, optional]

A pointer to the GUID of the device setup class to associate with the newly created device information set. If this parameter is specified, only devices of this class can be included in this device information set. If this parameter is set to NULL, the device information set is not associated with a specific device setup class.

-param hwndParent [in, optional]

A handle to the top-level window to use for any user interface that is related to non-device-specific actions (such as a select-device dialog box that uses the global class driver list). This handle is optional and can be NULL. If a specific top-level window is not required, set hwndParent to NULL.

-param MachineName [in, optional]

A pointer to a NULL-terminated string that contains the name of a computer on a network. If a name is specified, only devices on that computer can be created and opened in this device information set. If this parameter is set to NULL, the device information set is for devices on the local computer.

Caution

Using this function to access remote machines is not supported beginning with Windows 8 and Windows Server 2012, as this functionality has been removed.

-param Reserved

Must be NULL.

-returns

The function returns a handle to an empty device information set if it is successful. Otherwise, it returns INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.

-remarks

The caller of this function must delete the returned device information set when it is no longer needed by calling SetupDiDestroyDeviceInfoList.

If the device information set is for devices on a remote computer (MachineName is not NULL), all subsequent operations on this set or any of its elements must use routines that support device information sets with remote elements. The SetupDiXxx routines that do not provide this support, such as SetupDiCallClassInstaller, have a statement to that effect in their reference page.

Note

The setupapi.h header defines SetupDiCreateDeviceInfoListEx as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

SetupDiCreateDeviceInfoList

SetupDiDestroyDeviceInfoList

SetupDiGetDeviceInfoListDetail