CM_Set_DevNode_Registry_Property(DEVINST,ULONG,PCVOID,ULONG,ULONG) function

[CM_Set_DevNode_Registry_Property is available for use in Windows 2000 and Windows XP. It may be altered or unavailable in subsequent versions. Applications should use the SetupDiSetDeviceRegistryProperty function.]

The CM_Set_DevNode_Registry_Property function sets the specified device property in the registry.

DWORD CM_Set_DevNode_Registry_Property(
  DEVINST dnDevInst,
  ULONG ulProperty,
  PCVOID Buffer,
  ULONG ulLength,
  ULONG ulFlags
);

Parameters

  • dnDevInst
    [in] Handle to the device instance.
  • ulProperty
    [in] Device property to be set. See the CM_DRP_* constants defined in Cfgmgr32.h.
  • Buffer
    [in, optional] Pointer to a caller-supplied buffer that specifies the requested device property, formatted appropriately for the property's data type.
  • ulLength
    [in] Size of the device property, in bytes.
  • ulFlags
    [in] Not used, must be zero.

Return Value

If the function succeeds, the return value is CR_SUCCESS. Otherwise, the return value is one of the following error codes:

CR_BUFFER_SMALL
CR_INVALID_DATA
CR_INVALID_DEVNODE
CR_INVALID_FLAG
CR_INVALID_POINTER
CR_NO_SUCH_REGISTRY_KEY
CR_NO_SUCH_VALUE
CR_OUT_OF_MEMORY
CR_REGISTRY_ERROR

Requirements

Client Requires Windows XP or Windows 2000 Professional.
Server Requires Windows Server 2003 or Windows 2000 Server.
Header

Declared in Cfgmgr32.h.

Library

Use Setupapi.lib.

DLL Requires Setupapi.dll.
Unicode

Implemented as CM_Set_DevNode_Registry_PropertyW (Unicode) and CM_Set_DevNode_Registry_PropertyA (ANSI).

See Also

Device Management Functions
SetupDiSetDeviceRegistryProperty