Implemented SHRegSetUSValueA and SHRegSetUSValueW.
This commit is contained in:
parent
b5d8f532db
commit
84361d5a47
|
@ -402,6 +402,66 @@ LONG WINAPI SHRegGetUSValueW(
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHRegSetUSValueA [SHLWAPI.@]
|
||||
*/
|
||||
LONG WINAPI SHRegSetUSValueA(
|
||||
LPCSTR pszSubKey,
|
||||
LPCSTR pszValue,
|
||||
DWORD dwType,
|
||||
LPVOID pvData,
|
||||
DWORD cbData,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
HUSKEY myhuskey;
|
||||
LONG ret;
|
||||
BOOL ignoreHKCU;
|
||||
|
||||
if (!pvData) return ERROR_INVALID_FUNCTION;
|
||||
TRACE("key '%s', value '%s', datalen %ld\n",
|
||||
debugstr_a(pszSubKey), debugstr_a(pszValue), cbData);
|
||||
|
||||
ignoreHKCU = ((dwFlags == SHREGSET_HKLM) || (dwFlags == SHREGSET_FORCE_HKLM));
|
||||
|
||||
ret = SHRegOpenUSKeyA(pszSubKey, 0x1, 0, &myhuskey, ignoreHKCU);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
ret = SHRegWriteUSValueA(myhuskey, pszValue, dwType, pvData,
|
||||
cbData, dwFlags);
|
||||
SHRegCloseUSKey(myhuskey);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHRegSetUSValueW [SHLWAPI.@]
|
||||
*/
|
||||
LONG WINAPI SHRegSetUSValueW(
|
||||
LPCWSTR pszSubKey,
|
||||
LPCWSTR pszValue,
|
||||
DWORD dwType,
|
||||
LPVOID pvData,
|
||||
DWORD cbData,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
HUSKEY myhuskey;
|
||||
LONG ret;
|
||||
BOOL ignoreHKCU;
|
||||
|
||||
if (!pvData) return ERROR_INVALID_FUNCTION;
|
||||
TRACE("key '%s', value '%s', datalen %ld\n",
|
||||
debugstr_w(pszSubKey), debugstr_w(pszValue), cbData);
|
||||
|
||||
ignoreHKCU = ((dwFlags == SHREGSET_HKLM) || (dwFlags == SHREGSET_FORCE_HKLM));
|
||||
|
||||
ret = SHRegOpenUSKeyW(pszSubKey, 0x1, 0, &myhuskey, ignoreHKCU);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
ret = SHRegWriteUSValueW(myhuskey, pszValue, dwType, pvData,
|
||||
cbData, dwFlags);
|
||||
SHRegCloseUSKey(myhuskey);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHRegGetBoolUSValueA [SHLWAPI.@]
|
||||
*/
|
||||
|
|
|
@ -594,8 +594,8 @@
|
|||
@ stdcall SHRegQueryInfoUSKeyW ( long ptr ptr ptr ptr long ) SHRegQueryInfoUSKeyW
|
||||
@ stdcall SHRegQueryUSValueA ( long str ptr ptr ptr long ptr long ) SHRegQueryUSValueA
|
||||
@ stdcall SHRegQueryUSValueW ( long wstr ptr ptr ptr long ptr long ) SHRegQueryUSValueW
|
||||
@ stub SHRegSetUSValueA
|
||||
@ stub SHRegSetUSValueW
|
||||
@ stdcall SHRegSetUSValueA ( str str long ptr long long) SHRegSetUSValueA
|
||||
@ stdcall SHRegSetUSValueW ( wstr wstr long ptr long long) SHRegSetUSValueW
|
||||
@ stdcall SHRegWriteUSValueA (long str long ptr long long) SHRegWriteUSValueA
|
||||
@ stdcall SHRegWriteUSValueW (long str long ptr long long) SHRegWriteUSValueW
|
||||
@ stdcall SHSetValueA (long str str long ptr long) SHSetValueA
|
||||
|
|
Loading…
Reference in New Issue