The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



Call this method to store data in a specified value field of a specified key.

      LONG SetKeyValue(
   LPCTSTR lpszKeyName,
   LPCTSTR lpszValue,
   LPCTSTR lpszValueName = NULL 
) throw( );


Specifies the name of the key to be created or opened. This name must be a subkey of m_hKey.


Specifies the data to be stored. This parameter must be non-NULL.


Specifies the value field to be set. If a value field with this name does not already exist in the key, it is added.

If successful, returns ERROR_SUCCESS; otherwise, a nonzero error code defined in WINERROR.H.

Call this method to create or open the lpszKeyName key and store the lpszValue data in the lpszValueName value field.


Header: atlbase.h