shlwapi: Added SKAllocValueW implementation.
This commit is contained in:
parent
c2f25a2206
commit
0ce727e433
|
@ -4603,6 +4603,43 @@ HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObj
|
||||||
return hRet;
|
return hRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SKAllocValueW (SHLWAPI.519)
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI SKAllocValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD *type,
|
||||||
|
LPVOID *data, DWORD *count)
|
||||||
|
{
|
||||||
|
DWORD ret, size;
|
||||||
|
HKEY hkey;
|
||||||
|
|
||||||
|
TRACE("(0x%x, %s, %s, %p, %p, %p)\n", flags, debugstr_w(subkey),
|
||||||
|
debugstr_w(value), type, data, count);
|
||||||
|
|
||||||
|
hkey = SHGetShellKey(flags, subkey, FALSE);
|
||||||
|
if (!hkey)
|
||||||
|
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
|
||||||
|
|
||||||
|
ret = SHQueryValueExW(hkey, value, NULL, type, NULL, &size);
|
||||||
|
if (ret) {
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
return HRESULT_FROM_WIN32(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
size += 2;
|
||||||
|
*data = LocalAlloc(0, size);
|
||||||
|
if (!*data) {
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = SHQueryValueExW(hkey, value, NULL, type, *data, &size);
|
||||||
|
if (count)
|
||||||
|
*count = size;
|
||||||
|
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
return HRESULT_FROM_WIN32(ret);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SKGetValueW (SHLWAPI.516)
|
* SKGetValueW (SHLWAPI.516)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -512,7 +512,7 @@
|
||||||
516 stdcall -noname SKGetValueW(long wstr wstr long long long)
|
516 stdcall -noname SKGetValueW(long wstr wstr long long long)
|
||||||
517 stub -noname SKSetValueW
|
517 stub -noname SKSetValueW
|
||||||
518 stub -noname SKDeleteValueW
|
518 stub -noname SKDeleteValueW
|
||||||
519 stub -noname SKAllocValueW
|
519 stdcall -noname SKAllocValueW(long wstr wstr ptr ptr ptr)
|
||||||
520 stub -noname SHPropertyBag_ReadBSTR
|
520 stub -noname SHPropertyBag_ReadBSTR
|
||||||
521 stub -noname SHPropertyBag_ReadPOINTL
|
521 stub -noname SHPropertyBag_ReadPOINTL
|
||||||
522 stub -noname SHPropertyBag_WritePOINTL
|
522 stub -noname SHPropertyBag_WritePOINTL
|
||||||
|
|
Loading…
Reference in New Issue