| 1 | /* $Id: shellreg.c,v 1.1 2000-08-30 13:52:56 sandervl Exp $ */ | 
|---|
| 2 | /* | 
|---|
| 3 | Shell Registry Access | 
|---|
| 4 | */ | 
|---|
| 5 | #ifdef __WIN32OS2__ | 
|---|
| 6 | #define ICOM_CINTERFACE 1 | 
|---|
| 7 | #include <odin.h> | 
|---|
| 8 | #endif | 
|---|
| 9 | #include <string.h> | 
|---|
| 10 | #include <stdio.h> | 
|---|
| 11 | #include "winerror.h" | 
|---|
| 12 | #include "winreg.h" | 
|---|
| 13 | #include "debugtools.h" | 
|---|
| 14 | #include "winnls.h" | 
|---|
| 15 | #include "heap.h" | 
|---|
| 16 |  | 
|---|
| 17 | #include "shellapi.h" | 
|---|
| 18 | #include "shlobj.h" | 
|---|
| 19 | #include "shell32_main.h" | 
|---|
| 20 | #include "wine/undocshell.h" | 
|---|
| 21 |  | 
|---|
| 22 | DEFAULT_DEBUG_CHANNEL(shell); | 
|---|
| 23 |  | 
|---|
| 24 | /************************************************************************* | 
|---|
| 25 | * SHRegOpenKeyA                                [SHELL32.506] | 
|---|
| 26 | * | 
|---|
| 27 | */ | 
|---|
| 28 | HRESULT WINAPI SHRegOpenKeyA( | 
|---|
| 29 | HKEY hKey, | 
|---|
| 30 | LPSTR lpSubKey, | 
|---|
| 31 | LPHKEY phkResult) | 
|---|
| 32 | { | 
|---|
| 33 | TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult); | 
|---|
| 34 | return RegOpenKeyA(hKey, lpSubKey, phkResult); | 
|---|
| 35 | } | 
|---|
| 36 |  | 
|---|
| 37 | /************************************************************************* | 
|---|
| 38 | * SHRegOpenKeyW                                [NT4.0:SHELL32.507] | 
|---|
| 39 | * | 
|---|
| 40 | */ | 
|---|
| 41 | HRESULT WINAPI SHRegOpenKeyW ( | 
|---|
| 42 | HKEY hkey, | 
|---|
| 43 | LPCWSTR lpszSubKey, | 
|---|
| 44 | LPHKEY retkey) | 
|---|
| 45 | { | 
|---|
| 46 | WARN("0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey); | 
|---|
| 47 | return RegOpenKeyW( hkey, lpszSubKey, retkey ); | 
|---|
| 48 | } | 
|---|
| 49 |  | 
|---|
| 50 | /************************************************************************* | 
|---|
| 51 | * SHRegQueryValueExA   [SHELL32.509] | 
|---|
| 52 | * | 
|---|
| 53 | */ | 
|---|
| 54 | HRESULT WINAPI SHRegQueryValueExA( | 
|---|
| 55 | HKEY hkey, | 
|---|
| 56 | LPSTR lpValueName, | 
|---|
| 57 | LPDWORD lpReserved, | 
|---|
| 58 | LPDWORD lpType, | 
|---|
| 59 | LPBYTE lpData, | 
|---|
| 60 | LPDWORD lpcbData) | 
|---|
| 61 | { | 
|---|
| 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); | 
|---|
| 64 | } | 
|---|
| 65 |  | 
|---|
| 66 | /************************************************************************* | 
|---|
| 67 | * SHRegQueryValueW                             [NT4.0:SHELL32.510] | 
|---|
| 68 | * | 
|---|
| 69 | */ | 
|---|
| 70 | HRESULT WINAPI SHRegQueryValueW( | 
|---|
| 71 | HKEY hkey, | 
|---|
| 72 | LPWSTR lpszSubKey, | 
|---|
| 73 | LPWSTR lpszData, | 
|---|
| 74 | LPDWORD lpcbData ) | 
|---|
| 75 | { | 
|---|
| 76 | WARN("0x%04x %s %p %p semi-stub\n", | 
|---|
| 77 | hkey, debugstr_w(lpszSubKey), lpszData, lpcbData); | 
|---|
| 78 | return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData ); | 
|---|
| 79 | } | 
|---|
| 80 |  | 
|---|
| 81 | /************************************************************************* | 
|---|
| 82 | * SHRegQueryValueExW   [NT4.0:SHELL32.511] | 
|---|
| 83 | * | 
|---|
| 84 | * FIXME | 
|---|
| 85 | *  if the datatype REG_EXPAND_SZ then expand the string and change | 
|---|
| 86 | *  *pdwType to REG_SZ. | 
|---|
| 87 | */ | 
|---|
| 88 | HRESULT WINAPI SHRegQueryValueExW ( | 
|---|
| 89 | HKEY hkey, | 
|---|
| 90 | LPWSTR pszValue, | 
|---|
| 91 | LPDWORD pdwReserved, | 
|---|
| 92 | LPDWORD pdwType, | 
|---|
| 93 | LPVOID pvData, | 
|---|
| 94 | LPDWORD pcbData) | 
|---|
| 95 | { | 
|---|
| 96 | DWORD ret; | 
|---|
| 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); | 
|---|
| 100 | return ret; | 
|---|
| 101 | } | 
|---|
| 102 |  | 
|---|
| 103 | #ifndef __WIN32OS2__ | 
|---|
| 104 | /************************************************************************* | 
|---|
| 105 | * SHRegDeleteKeyA   [SHELL32] | 
|---|
| 106 | */ | 
|---|
| 107 | HRESULT WINAPI SHRegDeleteKeyA( | 
|---|
| 108 | HKEY hkey, | 
|---|
| 109 | LPCSTR pszSubKey) | 
|---|
| 110 | { | 
|---|
| 111 | FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey)); | 
|---|
| 112 | return 0; | 
|---|
| 113 | } | 
|---|
| 114 | #endif | 
|---|
| 115 |  | 
|---|
| 116 | /************************************************************************* | 
|---|
| 117 | * SHRegDeleteKeyW   [SHELL32] | 
|---|
| 118 | */ | 
|---|
| 119 | HRESULT WINAPI SHRegDeleteKeyW( | 
|---|
| 120 | HKEY hkey, | 
|---|
| 121 | LPCWSTR pszSubKey) | 
|---|
| 122 | { | 
|---|
| 123 | FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey)); | 
|---|
| 124 | return 0; | 
|---|
| 125 | } | 
|---|
| 126 |  | 
|---|
| 127 | /************************************************************************* | 
|---|
| 128 | * SHRegCloseKey                        [NT4.0:SHELL32.505] | 
|---|
| 129 | * | 
|---|
| 130 | */ | 
|---|
| 131 | HRESULT WINAPI SHRegCloseKey (HKEY hkey) | 
|---|
| 132 | { | 
|---|
| 133 | TRACE("0x%04x\n",hkey); | 
|---|
| 134 | return RegCloseKey( hkey ); | 
|---|
| 135 | } | 
|---|