reactos/reactos/dll/win32/shell32/shellreg.c

145 lines
3.9 KiB
C
Raw Normal View History

/*
* Shell Registry Access
*
* Copyright 2000 Juergen Schmied
*
* 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
----------------------------------------------------- autocomplete.c: Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers Constify some variables. ----------------------------------------------------- dde.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- dragdrophelper.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. ----------------------------------------------------- enumidlist.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. ----------------------------------------------------- enumidlist.h: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shellreg.c: Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. Detlef Riekenberg <wine.dev@web.de> Implement SHRegQueryValueA with RegQueryValueA. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shellstring.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. ----------------------------------------------------- shlfsbind.c Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> shell32: Win64 printf format warning fixes. Andrew Talbot <Andrew.Talbot@talbotville.com> shell32: Exclude unused headers. ----------------------------------------------------- shlmenu.c: Dmitry Timoshkov <dmitry@codeweavers.com> Switch to using 'long' for INT_PTR type for 64-bit compatibility. Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. James Hawkins <truiken@gmail.com> janitorial: Remove redundant NULL checks before SHFree. Francois Gouget <fgouget@free.fr> Fix spelling of a local variable. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shpolicy.c: Dmitry Timoshkov <dmitry@codeweavers.com> Make some data static and const. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. svn path=/trunk/; revision=29485
2007-10-10 22:39:44 +00:00
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <precomp.h>
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/*************************************************************************
* SHRegOpenKeyA [SHELL32.506]
*
*/
HRESULT WINAPI SHRegOpenKeyA(
HKEY hKey,
LPSTR lpSubKey,
PHKEY phkResult)
{
TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
return RegOpenKeyA(hKey, lpSubKey, phkResult);
}
/*************************************************************************
* SHRegOpenKeyW [SHELL32.507] NT 4.0
*
*/
HRESULT WINAPI SHRegOpenKeyW (
HKEY hkey,
LPCWSTR lpszSubKey,
PHKEY retkey)
{
WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
return RegOpenKeyW( hkey, lpszSubKey, retkey );
}
----------------------------------------------------- autocomplete.c: Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers Constify some variables. ----------------------------------------------------- dde.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- dragdrophelper.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. ----------------------------------------------------- enumidlist.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. ----------------------------------------------------- enumidlist.h: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shellreg.c: Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. Detlef Riekenberg <wine.dev@web.de> Implement SHRegQueryValueA with RegQueryValueA. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shellstring.c: Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. ----------------------------------------------------- shlfsbind.c Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. Hans Leidekker <hans@it.vu.nl> shell32: Win64 printf format warning fixes. Andrew Talbot <Andrew.Talbot@talbotville.com> shell32: Exclude unused headers. ----------------------------------------------------- shlmenu.c: Dmitry Timoshkov <dmitry@codeweavers.com> Switch to using 'long' for INT_PTR type for 64-bit compatibility. Andrew Talbot <Andrew.Talbot@talbotville.com> Exclude unused headers. Hans Leidekker <hans@it.vu.nl> Win64 printf format warning fixes. James Hawkins <truiken@gmail.com> janitorial: Remove redundant NULL checks before SHFree. Francois Gouget <fgouget@free.fr> Fix spelling of a local variable. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. ----------------------------------------------------- shpolicy.c: Dmitry Timoshkov <dmitry@codeweavers.com> Make some data static and const. Jonathan Ernst <jonathan@ernstfamily.ch> Update the address of the Free Software Foundation. svn path=/trunk/; revision=29485
2007-10-10 22:39:44 +00:00
/*************************************************************************
* SHRegQueryValueA [SHELL32.508]
*
*/
HRESULT WINAPI SHRegQueryValueA(HKEY hkey, LPSTR lpSubKey, LPSTR lpValue, LPDWORD lpcbValue)
{
TRACE("(%p %s %p %p)\n", hkey, debugstr_a(lpSubKey), lpValue, lpcbValue);
return RegQueryValueA(hkey, lpSubKey, lpValue, (LONG*)lpcbValue);
}
/*************************************************************************
* SHRegQueryValueExA [SHELL32.509]
*
*/
HRESULT WINAPI SHRegQueryValueExA(
HKEY hkey,
LPSTR lpValueName,
LPDWORD lpReserved,
LPDWORD lpType,
LPBYTE lpData,
LPDWORD lpcbData)
{
TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
}
/*************************************************************************
* SHRegQueryValueW [SHELL32.510] NT4.0
*
*/
HRESULT WINAPI SHRegQueryValueW(
HKEY hkey,
LPWSTR lpszSubKey,
LPWSTR lpszData,
LPDWORD lpcbData )
{
WARN("%p %s %p %p semi-stub\n",
hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
Sync to Wine-20050830: Michael Jung <mjung@iss.tu-darmstadt.de> - Initialize all members in UnixFolder constructor. Support NULL value pidls in GetDisplayNameOf method. - Implemented IPersist::GetClassID. - Use wine_get_dos_file_name instead of GetFullPathName. - Implemented 'My Documents' folder. - Added stubbed implementation of IPersistPropertyBag interface. Register unixfs as CLSID_FolderShortcut. - Clone pidlLast before free'ing pidl after call to SHBindToParent. - Use FIXME's in stubs instead of TRACE's. Infer pathmode from CLSID in UnixFolderConstructor. Fail in IShellFolder::BindToObject, if folder does not initialize. - Use StringFromGUID2 instead of StringFromCLSID in UNIXFS_is_rooted_at_desktop. Michael Jung <mjung@iss.tu-darmstadt.de> Ge van Geldorp <gvg@reactos.com> - Prepend Desktop folder path for files/directories stored in the filesystem Desktop folder when GetDisplayNameOf is called with the SHGDN_FORPARSING flags. - Add testcases. Ge van Geldorp <gvg@reactos.com> - Fix resource leak on error paths. - Do not load all shell32 icons during initialization, it wastes a lot of memory Alexandre Julliard <julliard@winehq.org> - Replace the _ICOM_THIS_From macros by inline functions the way it's already done in shelllink.c. - Use ERR instead of DPRINTF in dump_pidl_hex. - Don't prefix the functions DllCanUnloadNow, DllGetClassObject and Dll(Un)RegisterServer with the dll name so that the compiler can check the prototypes. - Uncomment the typedef in the DECLARE_INTERFACE macro, and get rid of duplicate typedefs. - Get rid of the _ICOM_THIS macros and call the inline function directly instead. - Removed the broken mmap64 configure check, and moved the _FILE_OFFSET_BITS define to wine/port.h. Made sure that all files that need the define include it. - Added missing ntdll imports. Francois Gouget <fgouget@codeweavers.com> - Fix ShellExecute("\"foo.doc\"") for Internet Explorer 6. - Update the conformance tests accordingly. - Tweak a trace because it's very confusing to see the path with no escaped quotes in ShellExecuteA() and then with escaped quotes in ShellExecuteExW32() (due to debugstr_w()). - Fix the return value of SHELL_Argify() so it once again returns true if a '%1' or equivalent placeholder was found. This fixes ShellExecuteEx(lpFile="foo.txt", lpClass="txtfile"). - Fix handling of SEE_MASK_CLASSNAME and SEE_MASK_CLASSKEY. They are not disjoint flags. Mike McCormack <mike@codeweavers.com> - Warning fixes for gcc 4.0. - Fix some gcc 4.0 warnings. Jozef Stefanka <jstefanka@codeweavers.com> - Fixed browsing to other directories in Word 2003 file open dialog. Double clicking on a folder in the File->Open dialog works now. Steven Edwards <steven_ed4153@yahoo.com> - Correct definition of SFGAO_STORAGEANCESTOR. Jason Edmeades <us@edmeades.me.uk> - Add the time to the file display dialog modified column. - Handle context menu->refresh, and F5 to initiate a refresh of the file dialog. svn path=/trunk/; revision=17714
2005-09-07 08:43:45 +00:00
return RegQueryValueW( hkey, lpszSubKey, lpszData, (LONG*)lpcbData );
}
/*************************************************************************
* SHRegQueryValueExW [SHELL32.511] NT4.0
*
* FIXME
* if the datatype REG_EXPAND_SZ then expand the string and change
* *pdwType to REG_SZ.
*/
HRESULT WINAPI SHRegQueryValueExW (
HKEY hkey,
LPWSTR pszValue,
LPDWORD pdwReserved,
LPDWORD pdwType,
LPVOID pvData,
LPDWORD pcbData)
{
DWORD ret;
WARN("%p %s %p %p %p %p semi-stub\n",
hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
return ret;
}
/*************************************************************************
* SHRegDeleteKeyA [SHELL32.?]
*/
HRESULT WINAPI SHRegDeleteKeyA(
HKEY hkey,
LPCSTR pszSubKey)
{
FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey));
return 0;
}
/*************************************************************************
* SHRegDeleteKeyW [SHELL32.512]
*/
HRESULT WINAPI SHRegDeleteKeyW(
HKEY hkey,
LPCWSTR pszSubKey)
{
FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey));
return 0;
}
/*************************************************************************
* SHRegCloseKey [SHELL32.505] NT 4.0
*
*/
HRESULT WINAPI SHRegCloseKey (HKEY hkey)
{
TRACE("%p\n",hkey);
return RegCloseKey( hkey );
}