Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 2.94 KB

nf-setupapi-setupdigetselecteddevice.md

File metadata and controls

79 lines (61 loc) · 2.94 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.SetupDiGetSelectedDevice
SetupDiGetSelectedDevice function (setupapi.h)
The SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.
SetupDiGetSelectedDevice
SetupDiGetSelectedDevice function [Device and Driver Installation]
devinst.setupdigetselecteddevice
di-rtns_c28297c0-dcc3-4bfa-9448-46ec7e9ac3a0.xml
setupapi/SetupDiGetSelectedDevice
devinst\setupdigetselecteddevice.htm
devinst
317ed10b-f779-449e-8b57-329279629cc6
12/05/2018
SetupDiGetSelectedDevice, SetupDiGetSelectedDevice function [Device and Driver Installation], devinst.setupdigetselecteddevice, di-rtns_c28297c0-dcc3-4bfa-9448-46ec7e9ac3a0.xml, setupapi/SetupDiGetSelectedDevice
setupapi.h
Setupapi.h
Desktop
Available in Microsoft Windows 2000 and later versions of Windows.
Setupapi.lib
Setupapi.dll
Windows
19H1
SetupDiGetSelectedDevice
setupapi/SetupDiGetSelectedDevice
c++
APIRef
kbSyntax
DllExport
Setupapi.dll
SetupDiGetSelectedDevice

SetupDiGetSelectedDevice function

-description

The SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.

-parameters

-param DeviceInfoSet [in]

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

-param DeviceInfoData [out]

A pointer to an SP_DEVINFO_DATA structure that receives information about the selected device information element for DeviceInfoSet. The caller must set DeviceInfoData.cbSize to sizeof(SP_DEVINFO_DATA). If a device is currently not selected, the function fails and a call to GetLastError returns ERROR_NO_DEVICE_SELECTED.

-returns

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

-remarks

SetupDiGetSelectedDevice is usually used by an installation wizard.

-see-also

SP_DEVINFO_DATA

SetupDiSetSelectedDevice