16 #include "undocshell.h"
17 #include "wine/winbase16.h"
18 #include "shell32_main.h"
20 #include "debugtools.h"
22 DEFAULT_DEBUG_CHANNEL(shell);
24 /*************************************************************************
25 * SHRegOpenKeyA [SHELL32.506]
28 HRESULT WINAPI SHRegOpenKeyA(
33 TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
34 return RegOpenKeyA(hKey, lpSubKey, phkResult);
37 /*************************************************************************
38 * SHRegOpenKeyW [SHELL32.507] NT 4.0
41 HRESULT WINAPI SHRegOpenKeyW (
46 WARN("0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
47 return RegOpenKeyW( hkey, lpszSubKey, retkey );
50 /*************************************************************************
51 * SHRegQueryValueExA [SHELL32.509]
54 HRESULT WINAPI SHRegQueryValueExA(
62 TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
63 return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
66 /*************************************************************************
67 * SHRegQueryValueW [SHELL32.510] NT4.0
70 HRESULT WINAPI SHRegQueryValueW(
76 WARN("0x%04x %s %p %p semi-stub\n",
77 hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
78 return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData );
81 /*************************************************************************
82 * SHRegQueryValueExW [SHELL32.511] NT4.0
85 * if the datatype REG_EXPAND_SZ then expand the string and change
88 HRESULT WINAPI SHRegQueryValueExW (
97 WARN("0x%04x %s %p %p %p %p semi-stub\n",
98 hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
99 ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
103 /*************************************************************************
104 * SHRegDeleteKeyA [SHELL32.?]
106 HRESULT WINAPI SHRegDeleteKeyA(
110 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey));
114 /*************************************************************************
115 * SHRegDeleteKeyW [SHELL32.512]
117 HRESULT WINAPI SHRegDeleteKeyW(
121 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey));
125 /*************************************************************************
126 * SHRegCloseKey [SHELL32.505] NT 4.0
129 HRESULT WINAPI SHRegCloseKey (HKEY hkey)
131 TRACE("0x%04x\n",hkey);
132 return RegCloseKey( hkey );
136 /* 16-bit functions */
138 /* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
139 * some programs. Do not remove those cases. -MM
141 static inline void fix_win16_hkey( HKEY *hkey )
143 if (*hkey == 0 || *hkey == 1) *hkey = HKEY_CLASSES_ROOT;
146 /******************************************************************************
147 * RegOpenKey [SHELL.1]
149 DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
151 fix_win16_hkey( &hkey );
152 return RegOpenKeyA( hkey, name, retkey );
155 /******************************************************************************
156 * RegCreateKey [SHELL.2]
158 DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
160 fix_win16_hkey( &hkey );
161 return RegCreateKeyA( hkey, name, retkey );
164 /******************************************************************************
165 * RegCloseKey [SHELL.3]
167 DWORD WINAPI RegCloseKey16( HKEY hkey )
169 fix_win16_hkey( &hkey );
170 return RegCloseKey( hkey );
173 /******************************************************************************
174 * RegDeleteKey [SHELL.4]
176 DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name )
178 fix_win16_hkey( &hkey );
179 return RegDeleteKeyA( hkey, name );
182 /******************************************************************************
183 * RegSetValue [SHELL.5]
185 DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
187 fix_win16_hkey( &hkey );
188 return RegSetValueA( hkey, name, type, data, count );
191 /******************************************************************************
192 * RegQueryValue [SHELL.6]
195 * Is this HACK still applicable?
198 * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
199 * mask out the high 16 bit. This (not so much incidently) hopefully fixes
202 DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count )
204 fix_win16_hkey( &hkey );
205 if (count) *count &= 0xffff;
206 return RegQueryValueA( hkey, name, data, count );
209 /******************************************************************************
210 * RegEnumKey [SHELL.7]
212 DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
214 fix_win16_hkey( &hkey );
215 return RegEnumKeyA( hkey, index, name, name_len );