Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets a string (REG_SZ) value into the registry.
Syntax
virtual HRESULT SetRegistryValueString(
  [in] HKEY    keyRoot,
  [in] LPCWSTR keyPath,
  [in] LPCWSTR valueName,
  [in] LPCWSTR data
) = 0;
Parameters
- 
keyRoot [in] 
- 
A handle to the root of the registry key. 
- 
keyPath [in] 
- 
The registry value path. 
- 
valueName [in] 
- 
The registry value name. 
- 
data [in] 
- 
A pointer to a string buffer to set the registry string value. 
Return value
If the function succeeds, it returns S_OK. If it fails, it returns an error value.
Requirements
| Minimum supported client | Windows 7 [desktop apps only] | 
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] | 
| Header | 
 | 
| DLL | 
 |