Commit 84361d5a authored by Maxime Bellengé's avatar Maxime Bellengé Committed by Alexandre Julliard

Implemented SHRegSetUSValueA and SHRegSetUSValueW.

parent b5d8f532
......@@ -396,7 +396,67 @@ LONG WINAPI SHRegGetUSValueW(
if (ret == ERROR_SUCCESS) {
ret = SHRegQueryUSValueW(myhuskey, pValue, pwType, pvData,
pcbData, flagIgnoreHKCU, pDefaultData,
wDefaultDataSize);
wDefaultDataSize);
SHRegCloseUSKey(myhuskey);
}
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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment