From 267f5afc37a26e5ad3678e90d24f6235f918966a Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 20 Nov 2005 14:30:08 +0000 Subject: [PATCH] Sync to Wine-0_9_1: Uwe Bonnes - Semi-stub implementation for SHRegGetValue(A|W). svn path=/trunk/; revision=19364 --- reactos/lib/shlwapi/reg.c | 62 +++++++++++++++++++++++++++++++ reactos/lib/shlwapi/shlwapi.rc | 1 + reactos/lib/shlwapi/shlwapi.spec | 2 + reactos/lib/shlwapi/shlwapi_Ko.rc | 35 +++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 reactos/lib/shlwapi/shlwapi_Ko.rc diff --git a/reactos/lib/shlwapi/reg.c b/reactos/lib/shlwapi/reg.c index 0cabaa4b9a6..15d14f81b44 100644 --- a/reactos/lib/shlwapi/reg.c +++ b/reactos/lib/shlwapi/reg.c @@ -1139,6 +1139,68 @@ DWORD WINAPI SHGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, return dwRet; } +/************************************************************************* + * SHRegGetValueA [SHLWAPI.@] + * + * Get a value from the registry. + * + * PARAMS + * hKey [I] Handle to registry key + * lpszSubKey [I] Name of sub key containing value to get + * lpszValue [I] Name of value to get + * srrf [I] Flags for restricting returned data + * pwType [O] Pointer to the values type + * pvData [O] Pointer to the values data + * pcbData [O] Pointer to the values size + * + * RETURNS + * Success: ERROR_SUCCESS. Output parameters contain the details read. + * Failure: An error code from RegOpenKeyExA() or SHQueryValueExA(). + */ +DWORD WINAPI SHRegGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, DWORD srrfFlags, + LPDWORD pwType, LPVOID pvData, LPDWORD pcbData) +{ + DWORD dwRet = 0; + HKEY hSubKey = 0; + + TRACE("(hkey=%p,%s,%s,%p,%p,%p)\n", hKey, debugstr_a(lpszSubKey), + debugstr_a(lpszValue), pwType, pvData, pcbData); + FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08lx\n", srrfFlags); + + dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey); + if (! dwRet) + { + /* SHQueryValueEx expands Environment strings */ + dwRet = SHQueryValueExA(hSubKey, lpszValue, 0, pwType, pvData, pcbData); + RegCloseKey(hSubKey); + } + return dwRet; +} + +/************************************************************************* + * SHReg GetRegValueW [SHLWAPI.@] + * + * See SHGetValueA. + */ +DWORD WINAPI SHRegGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, DWORD srrfFlags, + LPDWORD pwType, LPVOID pvData, LPDWORD pcbData) +{ + DWORD dwRet = 0; + HKEY hSubKey = 0; + + TRACE("(hkey=%p,%s,%s,0x%08lx, %p,%p,%p)\n", hKey, debugstr_w(lpszSubKey), + debugstr_w(lpszValue), srrfFlags,pwType, pvData, pcbData); + FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08lx\n", srrfFlags); + + dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey); + if (! dwRet) + { + dwRet = SHQueryValueExW(hSubKey, lpszValue, 0, pwType, pvData, pcbData); + RegCloseKey(hSubKey); + } + return dwRet; +} + /************************************************************************* * SHGetValueW [SHLWAPI.@] * diff --git a/reactos/lib/shlwapi/shlwapi.rc b/reactos/lib/shlwapi/shlwapi.rc index 2d69e8aab62..2cae7814cff 100644 --- a/reactos/lib/shlwapi/shlwapi.rc +++ b/reactos/lib/shlwapi/shlwapi.rc @@ -28,6 +28,7 @@ #include "shlwapi_De.rc" #include "shlwapi_En.rc" #include "shlwapi_Es.rc" +#include "shlwapi_Ko.rc" #include "shlwapi_Nl.rc" #include "shlwapi_No.rc" #include "shlwapi_It.rc" diff --git a/reactos/lib/shlwapi/shlwapi.spec b/reactos/lib/shlwapi/shlwapi.spec index 60ed4776c3e..3d897e203cc 100644 --- a/reactos/lib/shlwapi/shlwapi.spec +++ b/reactos/lib/shlwapi/shlwapi.spec @@ -726,6 +726,8 @@ @ stdcall SHRegGetPathW(long wstr wstr ptr long) @ stdcall SHRegGetUSValueA ( str str ptr ptr ptr long ptr long ) @ stdcall SHRegGetUSValueW ( wstr wstr ptr ptr ptr long ptr long ) +@ stdcall SHRegGetValueA ( long str str long ptr ptr ptr ) +@ stdcall SHRegGetValueW ( long wstr wstr long ptr ptr ptr ) @ stdcall SHRegOpenUSKeyA ( str long long long long ) @ stdcall SHRegOpenUSKeyW ( wstr long long long long ) @ stdcall SHRegQueryInfoUSKeyA ( long ptr ptr ptr ptr long ) diff --git a/reactos/lib/shlwapi/shlwapi_Ko.rc b/reactos/lib/shlwapi/shlwapi_Ko.rc new file mode 100644 index 00000000000..a158a6a8ad8 --- /dev/null +++ b/reactos/lib/shlwapi/shlwapi_Ko.rc @@ -0,0 +1,35 @@ +/* + * Korean resources for shlwapi + * + * Copyright 2005 YunSong Hwang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "¿¡·¯!" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "ÀÌ ¸Þ¼¼Áö¸¦ ´Ù½Ã´Â º¸¿©ÁÖÁö ¸¶½Ã¿À(&I)", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON L"È®ÀÎ(&O)" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"Ãë¼Ò(&C)" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"¿¹(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"¾Æ´Ï¿À(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} -- 2.17.1