shellreg.c 3.84 KB
Newer Older
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 * 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
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
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 35 36
#include "winerror.h"
#include "winreg.h"
#include "winnls.h"

37
#include "undocshell.h"
38 39
#include "wine/winbase16.h"

40
#include "wine/debug.h"
41

42
WINE_DEFAULT_DEBUG_CHANNEL(shell);
43 44 45 46 47 48 49 50

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

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

/*************************************************************************
71
 * SHRegQueryValueExA   [SHELL32.509]
72 73 74 75 76 77 78 79 80 81
 *
 */
HRESULT WINAPI SHRegQueryValueExA(
	HKEY hkey,
	LPSTR lpValueName,
	LPDWORD lpReserved,
	LPDWORD lpType,
	LPBYTE lpData,
	LPDWORD lpcbData)
{
82
	TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
83 84 85 86
	return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
}

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
87
 * SHRegQueryValueW				[SHELL32.510] NT4.0
88 89 90 91 92 93 94 95
 *
 */
HRESULT WINAPI SHRegQueryValueW(
	HKEY hkey,
	LPWSTR lpszSubKey,
	LPWSTR lpszData,
	LPDWORD lpcbData )
{
96
	WARN("%p %s %p %p semi-stub\n",
97 98 99 100 101
		hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
	return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData );
}

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

/*************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
124
 * SHRegDeleteKeyA   [SHELL32.?]
125 126 127 128 129
 */
HRESULT WINAPI SHRegDeleteKeyA(
	HKEY hkey,
	LPCSTR pszSubKey)
{
130
	FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey));
131 132 133 134
	return 0;
}

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

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