SECRegistry::SetValue
Sets a value for the key name specified.
Defined in: SECREG.CPP
Syntax
(32-bit) virtual BOOL SetValue(LPCTSTR lpszValueName, const CByteArray& bytes_to_write);
(32-bit) virtual BOOL SetValue(LPCTSTR lpszValueName, DWORD dwValue);
(32-bit) virtual BOOL SetValue(LPCTSTR lpszValueName, const CStringArray& strings_to_write);
(32-bit) virtual BOOL SetValue(LPCTSTR lpszValueName, const CString& strWrite);
(32-bit) virtual BOOL SetValue(LPCTSTR lpszValueName, const KeyValueTypes type_of_value_to_set, LPBYTE lpbValueData, const DWORD dwSize);
(16-bit) virtual BOOL SetValue(LPCTSTR lpSubKey, const CString& strWrite);
Return Value
Nonzero if value was successfully set, otherwise 0.
Parameters
lpszValueName
Name of value to set (32-bit).
lpSubKey
Name of the subkey to set value for )16-bit).
bytes_to_write
Array of bytes to write as binary type.
dwValue
DWORD value to write.
strings_to_write
Array of strings to write.
strWrite
Single string to write.
type_of_value_to_set
Type of value to be set. Can be one of the following:
typeBinary
typeDoubleWord
typeDoubleWordLittleEndian
typeDoubleWordBigEndian
typeUnexpandedString
typeSymbolicLink
typeMultipleString
typeNone
typeResourceList
typeString
lpbValueData
Pointer to buffer of data to be set.
dwSize
Size of buffer pointed to by lpbBuffer.
Comments
Sets the named value with the data value passed in. The 32-bit version encapsulates the RegSetValueEx API, 16-bit encapsulates the RegSetValue API.
See Also