Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CRegKey::SetBinaryValue

CRegKey::SetBinaryValue

Call this method to set the binary value of the registry key.

LONG SetBinaryValue( 
   LPCTSTR pszValueName, 
   const void* pValue, 
   ULONG nBytes  
) throw( );

pszValueName

Pointer to a string containing the name of the value to set. If a value with this name is not already present, the method adds it to the key.

pValue

Pointer to a buffer containing the data to be stored with the specified value name.

nBytes

Specifies the size, in bytes, of the information pointed to by the pValue parameter.

If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.

This method uses RegSetValueEx to write the value to the registry.

Header: atlbase.h

Show:
© 2015 Microsoft