CONFIGMG_Write_Registry_Value
CONFIGRET CONFIGMG_Write_Registry_Value(DEVNODE dnDevNode, PFARCHAR pszSubKey, PFARCHAR pszValueName, ULONG ulType, PFARVOID Buffer, ULONG ulLength, ULONG ulFlags)
Sets a value in the registry.
- Returns CR_SUCCESS if the function is successful. Otherwise, the return value can be CR_INVALID_DEVNODE, CR_INVALID_FLAG, CR_INVALID_POINTER or CR_REGITRY_ERROR.
- dnDevNode
- Handle of a device node. The devnode cannot have a NULL device ID.
- pszSubKey
- Name of the subkey. Can be NULL if none.
- pszValueName
- Name of the value.
- ulType
- Either REG_SZ if a string is to be written or REG_BINARY if a binary value is to be written.
- Buffer
- Address of the buffer that contains the registry data to write.
- ulLength
- The length of the buffer.
- ulFlags
- Must be a combination of the following.
CM_REGISTRY_HARDWARE |
Select the hardware branch. |
CM_REGISTRY_SOFTWARE |
Select the software branch |
CM_REGISTRY_USER |
Use HKEY_CURRENT_USER. |
CM_REGISTRY_CONFIG |
Use HKEY_CURRENT_CONFIG. |
See Also
CONFIGMG_Read_Registry_Value