8 #include "debugtools.h"
13 #include "shell32_main.h"
14 #include "wine/undocshell.h"
16 DEFAULT_DEBUG_CHANNEL(shell);
18 /*************************************************************************
19 * SHRegOpenKeyA [SHELL32.506]
22 HRESULT WINAPI SHRegOpenKeyA(
27 TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
28 return RegOpenKeyA(hKey, lpSubKey, phkResult);
31 /*************************************************************************
32 * SHRegOpenKeyW [NT4.0:SHELL32.507]
35 HRESULT WINAPI SHRegOpenKeyW (
40 WARN("0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
41 return RegOpenKeyW( hkey, lpszSubKey, retkey );
44 /*************************************************************************
45 * SHRegQueryValueExA [SHELL32.509]
48 HRESULT WINAPI SHRegQueryValueExA(
56 TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
57 return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
60 /*************************************************************************
61 * SHRegQueryValueW [NT4.0:SHELL32.510]
64 HRESULT WINAPI SHRegQueryValueW(
70 WARN("0x%04x %s %p %p semi-stub\n",
71 hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
72 return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData );
75 /*************************************************************************
76 * SHRegQueryValueExW [NT4.0:SHELL32.511]
79 * if the datatype REG_EXPAND_SZ then expand the string and change
82 HRESULT WINAPI SHRegQueryValueExW (
91 WARN("0x%04x %s %p %p %p %p semi-stub\n",
92 hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
93 ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
97 /*************************************************************************
98 * SHRegDeleteKeyA [SHELL32]
100 HRESULT WINAPI SHRegDeleteKeyA(
104 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey));
108 /*************************************************************************
109 * SHRegDeleteKeyW [SHELL32]
111 HRESULT WINAPI SHRegDeleteKeyW(
115 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey));
119 /*************************************************************************
120 * SHRegCloseKey [NT4.0:SHELL32.505]
123 HRESULT WINAPI SHRegCloseKey (HKEY hkey)
125 TRACE("0x%04x\n",hkey);
126 return RegCloseKey( hkey );
130 /* 16-bit functions */
132 /* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
133 * some programs. Do not remove those cases. -MM
135 static inline void fix_win16_hkey( HKEY *hkey )
137 if (*hkey == 0 || *hkey == 1) *hkey = HKEY_CLASSES_ROOT;
140 /******************************************************************************
141 * RegOpenKey16 [SHELL.1]
143 DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
145 fix_win16_hkey( &hkey );
146 return RegOpenKeyA( hkey, name, retkey );
149 /******************************************************************************
150 * RegCreateKey16 [SHELL.2]
152 DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
154 fix_win16_hkey( &hkey );
155 return RegCreateKeyA( hkey, name, retkey );
158 /******************************************************************************
159 * RegCloseKey16 [SHELL.3]
161 DWORD WINAPI RegCloseKey16( HKEY hkey )
163 fix_win16_hkey( &hkey );
164 return RegCloseKey( hkey );
167 /******************************************************************************
168 * RegDeleteKey16 [SHELL.4]
170 DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name )
172 fix_win16_hkey( &hkey );
173 return RegDeleteKeyA( hkey, name );
176 /******************************************************************************
177 * RegSetValue16 [SHELL.5]
179 DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
181 fix_win16_hkey( &hkey );
182 return RegSetValueA( hkey, name, type, data, count );
185 /******************************************************************************
186 * RegQueryValue16 [SHELL.6]
189 * Is this HACK still applicable?
192 * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
193 * mask out the high 16 bit. This (not so much incidently) hopefully fixes
196 DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count )
198 fix_win16_hkey( &hkey );
199 if (count) *count &= 0xffff;
200 return RegQueryValueA( hkey, name, data, count );
203 /******************************************************************************
204 * RegEnumKey16 [SHELL.7]
206 DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
208 fix_win16_hkey( &hkey );
209 return RegEnumKeyA( hkey, index, name, name_len );