CRegKey::SetValue

This method stores data in the specified value field of an open registry key. The first two versions of SetValue use m_hKey as the open key. The third version allows you to create or open a subkey of hKeyParent, and then set the value field of the subkey.

Syntax

LONG SetValue( DWORD dwValue, LPCTSTR lpszValueName );

LONG SetValue( LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL );

LONG SetValue( HKEY hKeyParent, LPCTSTR lpszKeyName, LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL );

At a Glance

Header file: Atlbase.h
Platforms:
Versions: Version 2.0 and later
Complete documentation: Visual C++ documentation

See Also

CRegKey Overview, CRegKey Methods, CRegKey::SetKeyValue, CRegKey::m_hKey