From 6aa94942456230154663680f476f653d64cdf0de Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 12 Oct 2010 16:37:18 +0200 Subject: [PATCH] shlwapi: Added SKDeleteValueW implementation. --- dlls/shlwapi/ordinal.c | 20 ++++++++++++++++++++ dlls/shlwapi/shlwapi.spec | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 8cd9eaa3fd0..aad84751b60 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -4640,6 +4640,26 @@ HRESULT WINAPI SKAllocValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD * return HRESULT_FROM_WIN32(ret); } +/*********************************************************************** + * SKDeleteValueW (SHLWAPI.518) + */ +HRESULT WINAPI SKDeleteValueW(DWORD flags, LPCWSTR subkey, LPCWSTR value) +{ + DWORD ret; + HKEY hkey; + + TRACE("(0x%x, %s %s)\n", flags, debugstr_w(subkey), debugstr_w(value)); + + hkey = SHGetShellKey(flags, subkey, FALSE); + if (!hkey) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + ret = RegDeleteValueW(hkey, value); + + RegCloseKey(hkey); + return HRESULT_FROM_WIN32(ret); +} + /*********************************************************************** * SKGetValueW (SHLWAPI.516) */ diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index dcd99896f90..04609b0dc47 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -511,7 +511,7 @@ 515 stdcall -noname SHGetViewStatePropertyBag(ptr wstr long ptr ptr) 516 stdcall -noname SKGetValueW(long wstr wstr long long long) 517 stub -noname SKSetValueW -518 stub -noname SKDeleteValueW +518 stdcall -noname SKDeleteValueW(long wstr wstr) 519 stdcall -noname SKAllocValueW(long wstr wstr ptr ptr ptr) 520 stub -noname SHPropertyBag_ReadBSTR 521 stub -noname SHPropertyBag_ReadPOINTL