UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:shlwapi.SHRegSetUSValueW |
SHRegSetUSValueW function (shlwapi.h) |
Sets a registry subkey value in a user-specific subtree (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE). (Unicode) |
|
shell\SHRegSetUSValue.htm |
shell |
96559f8c-8527-4924-928e-f27049069407 |
12/05/2018 |
SHREGSET_DEFAULT, SHREGSET_FORCE_HKCU, SHREGSET_FORCE_HKLM, SHREGSET_HKCU, SHREGSET_HKLM, SHRegSetUSValue, SHRegSetUSValue function [Windows Shell], SHRegSetUSValueA, SHRegSetUSValueW, _win32_SHRegSetUSValue, shell.SHRegSetUSValue, shlwapi/SHRegSetUSValue, shlwapi/SHRegSetUSValueA, shlwapi/SHRegSetUSValueW |
shlwapi.h |
Windows |
Windows 2000 Professional, Windows XP [desktop apps only] |
Windows 2000 Server [desktop apps only] |
SHRegSetUSValueW (Unicode) and SHRegSetUSValueA (ANSI) |
Shlwapi.lib |
Shlwapi.dll (version 4.71 or later) |
Windows |
19H1 |
|
|
|
|
|
|
Sets a registry subkey value in a user-specific subtree (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE).
TBD
TBD
Type: DWORD
Type of data to be stored. This parameter must be the REG_SZ type. For more information, see Registry Data Types.
Type: LPVOID*
Apointer to a null-terminated string that contains the value to be set for the specified key.
Type: DWORD
Length, in bytes, of the string pointed to by the pvData parameter, not including the terminating null character.
Type: DWORD
Flags indicating where the data should be written.
Write to HKEY_CURRENT_USER if empty.
Write to HKEY_CURRENT_USER.
Write to HKEY_LOCAL_MACHINE if empty.
Write to HKEY_LOCAL_MACHINE.
Equivalent to (SHREGSET_FORCE_HKCU | SHREGSET_HKLM).
Equivalent to (SHREGSET_FORCE_HKCU | SHREGSET_HKLM).
Write to HKEY_CURRENT_USER.
Write to HKEY_LOCAL_MACHINE.
Write to HKEY_CURRENT_USER if empty.
Write to HKEY_LOCAL_MACHINE if empty.
Type: LPCTSTR
A pointer to a null-terminated string with the name of the subkey.
Type: LPCTSTR
A pointer to a null-terminated string that specifies the name of the value.
Type: LSTATUS
Returns ERROR_SUCCESS if successful, or a nonzero error code defined in Winerror.h otherwise. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to retrieve a generic description of the error.
This function opens the key each time it is used. If your code involves setting a series of values in the same key, it is more efficient to open the key once with SHRegOpenUSKey and then use SHRegWriteUSValue to write the data.
Note
The shlwapi.h header defines SHRegSetUSValue as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.