Skip to content

Latest commit

 

History

History
191 lines (104 loc) · 9.66 KB

nf-setupapi-setupdisetclassregistrypropertyw.md

File metadata and controls

191 lines (104 loc) · 9.66 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.SetupDiSetClassRegistryPropertyW
SetupDiSetClassRegistryPropertyW function (setupapi.h)
The SetupDiSetClassRegistryProperty function sets a specified device class property in the registry. (Unicode)
SetupDiSetClassRegistryProperty
SetupDiSetClassRegistryProperty function [Device and Driver Installation]
SetupDiSetClassRegistryPropertyW
devinst.setupdisetclassregistryproperty
di-rtns_77b5fc07-42ec-4515-b20c-87cf1c8e4b86.xml
setupapi/SetupDiSetClassRegistryProperty
devinst\setupdisetclassregistryproperty.htm
devinst
78457461-11ef-44ec-aa60-1adf4a48db8c
01/30/2023
SetupDiSetClassRegistryProperty, SetupDiSetClassRegistryProperty function [Device and Driver Installation], SetupDiSetClassRegistryPropertyA, SetupDiSetClassRegistryPropertyW, devinst.setupdisetclassregistryproperty, di-rtns_77b5fc07-42ec-4515-b20c-87cf1c8e4b86.xml, setupapi/SetupDiSetClassRegistryProperty
setupapi.h
Setupapi.h
Desktop
Available in Windows XP and later versions of Windows.
Setupapi.lib
Windows
19H1
SetupDiSetClassRegistryPropertyW
setupapi/SetupDiSetClassRegistryPropertyW
c++
APIRef
kbSyntax
LibDef
Setupapi.lib
Setupapi.dll
SetupDiSetClassRegistryProperty - SetupDiSetClassRegistryPropertyW

SetupDiSetClassRegistryPropertyW function

-description

The SetupDiSetClassRegistryProperty function sets a specified device class property in the registry.

-parameters

-param ClassGuid [in]

A pointer to the GUID that identifies the device class for which a property is to be set.

-param Property [in]

A value that identifies the property to be set, which must be one of the following:

SPCRP_CHARACTERISTICS

The caller supplies flags that specify the device characteristics for the class. For a list of characteristics flags, see the DeviceCharacteristics parameter of IoCreateDevice. Device characteristics should be set when the device class is installed and should not be changed after the device class is installed.

SPCRP_DEVTYPE

The caller supplies the device type for the class. For more information, see Specifying Device Types. Device type should be set when a device class is installed and should not be changed after the device class is installed.

SPCRP_EXCLUSIVE

The caller supplies a DWORD value that specifies whether users can obtain exclusive access to devices for this class. The supplied value is 1 if exclusive access is allowed, or zero otherwise. The exclusive setting for a device should be set when a device class is installed and should not be changed after the device class is installed.

SPCRP_LOWERFILTERS

(Windows Vista and later) The caller supplies a REG_MULTI_SZ list of the service names of the lower filter drivers that are installed for the device setup class. For more information about how to install a class filter driver, see Installing a Filter Driver and INF ClassInstall32 Section.

SPCRP_SECURITY

The caller supplies the device's security descriptor as a SECURITY_DESCRIPTOR structure in self-relative format (described in the Microsoft Windows SDK documentation).

SPCRP_SECURITY_SDS

The caller supplies the device's security descriptor as a text string. For information about security descriptor strings, see Security Descriptor Definition Language (Windows). For information about the format of security descriptor strings, see Security Descriptor Definition Language (Windows).

SPCRP_UPPERFILTERS

(Windows Vista and later) The caller supplies a REG_MULTI_SZ list of the service names of the upper filter drivers that are installed for the device setup class. For more information about how to install a class filter driver, see Installing a Filter Driver and INF ClassInstall32 Section.

-param PropertyBuffer [in, optional]

A pointer to a buffer that supplies the specified property. This parameter is optional and can be NULL.

-param PropertyBufferSize [in]

The size, in bytes, of the PropertyBuffer buffer.

-param MachineName [in, optional]

A pointer to a NULL-terminated string that contains the name of a remote system on which to set the specified device class property. This parameter is optional and can be NULL. If this parameter is NULL, the property is set on the name of the local system.

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

Reserved, must be NULL.

- Property.SPCRP_CHARACTERISTICS

The caller supplies flags that specify the device characteristics for the class. For a list of characteristics flags, see the DeviceCharacteristics parameter of IoCreateDevice. Device characteristics should be set when the device class is installed and should not be changed after the device class is installed.

- Property.SPCRP_DEVTYPE

The caller supplies the device type for the class. For more information, see Specifying Device Types. Device type should be set when a device class is installed and should not be changed after the device class is installed.

- Property.SPCRP_EXCLUSIVE

The caller supplies a DWORD value that specifies whether users can obtain exclusive access to devices for this class. The supplied value is 1 if exclusive access is allowed, or zero otherwise. The exclusive setting for a device should be set when a device class is installed and should not be changed after the device class is installed.

- Property.SPCRP_LOWERFILTERS

(Windows Vista and later) The caller supplies a REG_MULTI_SZ list of the service names of the lower filter drivers that are installed for the device setup class. For more information about how to install a class filter driver, see Installing a Filter Driver and INF ClassInstall32 Section.

- Property.SPCRP_SECURITY

The caller supplies the device's security descriptor as a SECURITY_DESCRIPTOR structure in self-relative format (described in the Microsoft Windows SDK documentation).

- Property.SPCRP_SECURITY_SDS

The caller supplies the device's security descriptor as a text string. For information about security descriptor strings, see Security Descriptor Definition Language (Windows). For information about the format of security descriptor strings, see Security Descriptor Definition Language (Windows).

- Property.SPCRP_UPPERFILTERS

(Windows Vista and later) The caller supplies a REG_MULTI_SZ list of the service names of the upper filter drivers that are installed for the device setup class. For more information about how to install a class filter driver, see Installing a Filter Driver and INF ClassInstall32 Section.

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

To determine the data type for a device class property, call SetupDiGetClassRegistryProperty.

Note

The setupapi.h header defines SetupDiSetClassRegistryProperty 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

SetupDiGetClassRegistryProperty

SetupDiGetDeviceRegistryProperty

SetupDiSetDeviceRegistryProperty