shell32: Add a stub implementation for OpenAs_RunDLL.
[wine] / dlls / shell32 / shellreg.c
1 /*
2  * Shell Registry Access
3  *
4  * Copyright 2000 Juergen Schmied
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include "config.h"
22
23 #include <string.h>
24 #include <stdarg.h>
25 #include <stdio.h>
26
27 #include "windef.h"
28 #include "winbase.h"
29 #include "shellapi.h"
30 #include "wingdi.h"
31 #include "winuser.h"
32 #include "shlobj.h"
33 #include "winerror.h"
34 #include "winreg.h"
35 #include "winnls.h"
36
37 #include "undocshell.h"
38 #include "wine/winbase16.h"
39
40 #include "wine/debug.h"
41
42 WINE_DEFAULT_DEBUG_CHANNEL(shell);
43
44 /*************************************************************************
45  * SHRegOpenKeyA                                [SHELL32.506]
46  *
47  */
48 HRESULT WINAPI SHRegOpenKeyA(
49         HKEY hKey,
50         LPSTR lpSubKey,
51         PHKEY phkResult)
52 {
53         TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
54         return RegOpenKeyA(hKey, lpSubKey, phkResult);
55 }
56
57 /*************************************************************************
58  * SHRegOpenKeyW                                [SHELL32.507] NT 4.0
59  *
60  */
61 HRESULT WINAPI SHRegOpenKeyW (
62         HKEY hkey,
63         LPCWSTR lpszSubKey,
64         PHKEY retkey)
65 {
66         WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
67         return RegOpenKeyW( hkey, lpszSubKey, retkey );
68 }
69
70 /*************************************************************************
71  * SHRegQueryValueA   [SHELL32.508]
72  *
73  */
74 HRESULT WINAPI SHRegQueryValueA(HKEY hkey, LPSTR lpSubKey, LPSTR lpValue, LPDWORD lpcbValue)
75 {
76         TRACE("(%p %s %p %p)\n", hkey, debugstr_a(lpSubKey), lpValue, lpcbValue);
77         return RegQueryValueA(hkey, lpSubKey, lpValue, (LONG*)lpcbValue);
78 }
79
80 /*************************************************************************
81  * SHRegQueryValueExA   [SHELL32.509]
82  *
83  */
84 HRESULT WINAPI SHRegQueryValueExA(
85         HKEY hkey,
86         LPSTR lpValueName,
87         LPDWORD lpReserved,
88         LPDWORD lpType,
89         LPBYTE lpData,
90         LPDWORD lpcbData)
91 {
92         TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
93         return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
94 }
95
96 /*************************************************************************
97  * SHRegQueryValueW                             [SHELL32.510] NT4.0
98  *
99  */
100 HRESULT WINAPI SHRegQueryValueW(
101         HKEY hkey,
102         LPWSTR lpszSubKey,
103         LPWSTR lpszData,
104         LPDWORD lpcbData )
105 {
106         WARN("%p %s %p %p semi-stub\n",
107                 hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
108         return RegQueryValueW( hkey, lpszSubKey, lpszData, (LONG*)lpcbData );
109 }
110
111 /*************************************************************************
112  * SHRegQueryValueExW   [SHELL32.511] NT4.0
113  *
114  * FIXME
115  *  if the datatype REG_EXPAND_SZ then expand the string and change
116  *  *pdwType to REG_SZ.
117  */
118 HRESULT WINAPI SHRegQueryValueExW (
119         HKEY hkey,
120         LPWSTR pszValue,
121         LPDWORD pdwReserved,
122         LPDWORD pdwType,
123         LPVOID pvData,
124         LPDWORD pcbData)
125 {
126         DWORD ret;
127         WARN("%p %s %p %p %p %p semi-stub\n",
128                 hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
129         ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
130         return ret;
131 }
132
133 /*************************************************************************
134  * SHRegDeleteKeyA   [SHELL32.?]
135  */
136 HRESULT WINAPI SHRegDeleteKeyA(
137         HKEY hkey,
138         LPCSTR pszSubKey)
139 {
140         FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey));
141         return 0;
142 }
143
144 /*************************************************************************
145  * SHRegDeleteKeyW   [SHELL32.512]
146  */
147 HRESULT WINAPI SHRegDeleteKeyW(
148         HKEY hkey,
149         LPCWSTR pszSubKey)
150 {
151         FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey));
152         return 0;
153 }
154
155 /*************************************************************************
156  * SHRegCloseKey                        [SHELL32.505] NT 4.0
157  *
158  */
159 HRESULT WINAPI SHRegCloseKey (HKEY hkey)
160 {
161         TRACE("%p\n",hkey);
162         return RegCloseKey( hkey );
163 }