| Home | Table of Contents | Please view with Internet Explorer (version 5.00 or higher) and enable scripting. For reasons, see Browsing This Web Site. |
This function sets the data for a value in a subkey of a shell key.
HRESULT
SKSetValueW (
enum _SHELLKEY nShellKey,
LPCWSTR pszSubKey,
LPCWSTR pszValue,
DWORD dwType,
LPVOID pvData,
DWORD cbData);
The nShellKey argument selects the shell key by a combination of bit flags in the SHELLKEY enumeration.
The pszSubKey argument provides the address of a null-terminated string that names the subkey, or is NULL for the shell key itself.
The pszValue argument provides the address of a null-terminated string that names the value, or is NULL for the default value.
The dwType argument provides the data type, e.g., REG_SZ or REG_DWORD.
The pvData argument provides the address of a buffer that contains the data.
The cbData argument provides the size of the data, in bytes.
The function returns zero for success, else an error code.
The function opens or creates the given subkey of the selected shell key (using SHGetShellKey) and then sets the given data for the given value.
The SKSetValueW function is exported from SHLWAPI as ordinal 517 in version 6.00 and higher.
Though this function dates from 2001, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.