Skip to content

Latest commit

 

History

History
127 lines (78 loc) · 3.94 KB

nf-setupapi-setupdideletedevregkey.md

File metadata and controls

127 lines (78 loc) · 3.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.SetupDiDeleteDevRegKey
SetupDiDeleteDevRegKey function (setupapi.h)
The SetupDiDeleteDevRegKey function deletes specified user-accessible registry keys that are associated with a device information element.
SetupDiDeleteDevRegKey
SetupDiDeleteDevRegKey function [Device and Driver Installation]
devinst.setupdideletedevregkey
di-rtns_9e60aff0-2d01-4b1b-90e5-7f050a0e075a.xml
setupapi/SetupDiDeleteDevRegKey
devinst\setupdideletedevregkey.htm
devinst
3b332291-0593-4750-9965-f6bf90ec8838
12/05/2018
SetupDiDeleteDevRegKey, SetupDiDeleteDevRegKey function [Device and Driver Installation], devinst.setupdideletedevregkey, di-rtns_9e60aff0-2d01-4b1b-90e5-7f050a0e075a.xml, setupapi/SetupDiDeleteDevRegKey
setupapi.h
Setupapi.h
Desktop
Available in Microsoft Windows 2000 and later versions of Windows.
Setupapi.lib
Setupapi.dll
Windows
19H1
SetupDiDeleteDevRegKey
setupapi/SetupDiDeleteDevRegKey
c++
APIRef
kbSyntax
DllExport
Setupapi.dll
SetupDiDeleteDevRegKey

SetupDiDeleteDevRegKey function

-description

The SetupDiDeleteDevRegKey function deletes specified user-accessible registry keys that are associated with a device information element.

-parameters

-param DeviceInfoSet [in]

A handle to the device information set that contains a device information element that represents the device for which to delete registry keys. The device information set must not contain remote elements.

-param DeviceInfoData [in]

A pointer to an SP_DEVINFO_DATA structure that specifies the device information element in DeviceInfoSet.

-param Scope [in]

The scope of the registry key to delete. The scope indicates where the information is located. The key can be global or hardware profile-specific. Can be one of the following values:

DICS_FLAG_GLOBAL

Delete the key that stores global configuration information.

DICS_FLAG_CONFIGSPECIFIC

Delete the key that stores hardware profile-specific configuration information.

-param HwProfile [in]

If Scope is set to DICS_FLAG_CONFIGSPECIFIC, the HwProfile parameter specifies the hardware profile for which to delete the registry key. If HwProfile is 0, the key for the current hardware profile is deleted. If HwProfile is 0xFFFFFFFF, the registry key for all hardware profiles is deleted.

-param KeyType [in]

The type of registry storage key to delete. Can be one of the following values:

DIREG_DEV

Delete the device's hardware key.

DIREG_DRV

Delete the device's software key.

DIREG_BOTH

Delete both the hardware and software keys for the device.

-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

The caller of this function must be a member of the Administrators group.

The DeviceInfoSet must only contain elements on the local computer.

-see-also

SetupDiCreateDevRegKey

SetupDiGetHwProfileList