shellreg.c 3.91 KB
Newer Older
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 * 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
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19
 */
20 21 22

#include "config.h"

23
#include <string.h>
24
#include <stdarg.h>
25
#include <stdio.h>
26

27 28
#include "windef.h"
#include "winbase.h"
29
#include "shellapi.h"
30 31
#include "wingdi.h"
#include "winuser.h"
32
#include "shlobj.h"
33 34
#include "winreg.h"

35
#include "undocshell.h"
36 37
#include "wine/winbase16.h"

38
#include "wine/debug.h"
39

40
WINE_DEFAULT_DEBUG_CHANNEL(shell);
41 42 43 44 45 46 47 48

/*************************************************************************
 * SHRegOpenKeyA				[SHELL32.506]
 *
 */
HRESULT WINAPI SHRegOpenKeyA(
	HKEY hKey,
	LPSTR lpSubKey,
49
	PHKEY phkResult)
50
{
51
	TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
52 53 54 55
	return RegOpenKeyA(hKey, lpSubKey, phkResult);
}

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
56
 * SHRegOpenKeyW				[SHELL32.507] NT 4.0
57 58 59 60 61
 *
 */
HRESULT WINAPI SHRegOpenKeyW (
	HKEY hkey,
	LPCWSTR lpszSubKey,
62
	PHKEY retkey)
63
{
64
	WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
65 66 67
	return RegOpenKeyW( hkey, lpszSubKey, retkey );
}

68 69 70 71 72 73 74 75 76 77
/*************************************************************************
 * 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);
}

78
/*************************************************************************
79
 * SHRegQueryValueExA   [SHELL32.509]
80 81 82 83 84 85 86 87 88 89
 *
 */
HRESULT WINAPI SHRegQueryValueExA(
	HKEY hkey,
	LPSTR lpValueName,
	LPDWORD lpReserved,
	LPDWORD lpType,
	LPBYTE lpData,
	LPDWORD lpcbData)
{
90
	TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
91 92 93 94
	return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
}

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
95
 * SHRegQueryValueW				[SHELL32.510] NT4.0
96 97 98 99 100 101 102 103
 *
 */
HRESULT WINAPI SHRegQueryValueW(
	HKEY hkey,
	LPWSTR lpszSubKey,
	LPWSTR lpszData,
	LPDWORD lpcbData )
{
104
	WARN("%p %s %p %p semi-stub\n",
105
		hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
106
	return RegQueryValueW( hkey, lpszSubKey, lpszData, (LONG*)lpcbData );
107 108 109
}

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
110
 * SHRegQueryValueExW	[SHELL32.511] NT4.0
111
 *
112
 * FIXME
113
 *  if the datatype REG_EXPAND_SZ then expand the string and change
114
 *  *pdwType to REG_SZ.
115 116 117 118 119 120 121 122 123 124
 */
HRESULT WINAPI SHRegQueryValueExW (
	HKEY hkey,
	LPWSTR pszValue,
	LPDWORD pdwReserved,
	LPDWORD pdwType,
	LPVOID pvData,
	LPDWORD pcbData)
{
	DWORD ret;
125
	WARN("%p %s %p %p %p %p semi-stub\n",
126 127 128 129 130 131
		hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
	ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
	return ret;
}

/*************************************************************************
132
 * SHRegDeleteKeyW   [SHELL32.512]
133 134 135 136 137
 */
HRESULT WINAPI SHRegDeleteKeyW(
	HKEY hkey,
	LPCWSTR pszSubKey)
{
138
	FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey));
139 140 141 142
	return 0;
}

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
143
 * SHRegCloseKey			[SHELL32.505] NT 4.0
144 145 146 147
 *
 */
HRESULT WINAPI SHRegCloseKey (HKEY hkey)
{
148
	TRACE("%p\n",hkey);
149 150
	return RegCloseKey( hkey );
}