| 1 | /*
|
|---|
| 2 | Shell Registry Access
|
|---|
| 3 | */
|
|---|
| 4 | /*****************************************************************************
|
|---|
| 5 | * Includes *
|
|---|
| 6 | *****************************************************************************/
|
|---|
| 7 |
|
|---|
| 8 | #include <stdlib.h>
|
|---|
| 9 | #include <string.h>
|
|---|
| 10 | #include <odin.h>
|
|---|
| 11 | #include <odinwrap.h>
|
|---|
| 12 | #include <os2sel.h>
|
|---|
| 13 |
|
|---|
| 14 | #define ICOM_CINTERFACE 1
|
|---|
| 15 |
|
|---|
| 16 | #include <string.h>
|
|---|
| 17 | #include <stdio.h>
|
|---|
| 18 | #include "winerror.h"
|
|---|
| 19 | #include "winreg.h"
|
|---|
| 20 | #include "debugtools.h"
|
|---|
| 21 | #include "winnls.h"
|
|---|
| 22 | #include "heap.h"
|
|---|
| 23 |
|
|---|
| 24 | #include "shellapi.h"
|
|---|
| 25 | #include "shlobj.h"
|
|---|
| 26 | #include "shell32_main.h"
|
|---|
| 27 | #include "wine/undocshell.h"
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | /*****************************************************************************
|
|---|
| 32 | * Local Variables *
|
|---|
| 33 | *****************************************************************************/
|
|---|
| 34 |
|
|---|
| 35 | ODINDEBUGCHANNEL(shell32-shellreg)
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | /*************************************************************************
|
|---|
| 39 | * SHRegOpenKeyA [SHELL32.506]
|
|---|
| 40 | *
|
|---|
| 41 | */
|
|---|
| 42 | HRESULT WINAPI SHRegOpenKeyA(
|
|---|
| 43 | HKEY hKey,
|
|---|
| 44 | LPSTR lpSubKey,
|
|---|
| 45 | LPHKEY phkResult)
|
|---|
| 46 | {
|
|---|
| 47 | TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
|
|---|
| 48 | return RegOpenKeyA(hKey, lpSubKey, phkResult);
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | /*************************************************************************
|
|---|
| 52 | * SHRegOpenKeyW [NT4.0:SHELL32.507]
|
|---|
| 53 | *
|
|---|
| 54 | */
|
|---|
| 55 | HRESULT WINAPI SHRegOpenKeyW (
|
|---|
| 56 | HKEY hkey,
|
|---|
| 57 | LPCWSTR lpszSubKey,
|
|---|
| 58 | LPHKEY retkey)
|
|---|
| 59 | {
|
|---|
| 60 | WARN("0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
|
|---|
| 61 | return RegOpenKeyW( hkey, lpszSubKey, retkey );
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | /*************************************************************************
|
|---|
| 65 | * SHRegQueryValueExA [SHELL32.509]
|
|---|
| 66 | *
|
|---|
| 67 | */
|
|---|
| 68 | HRESULT WINAPI SHRegQueryValueExA(
|
|---|
| 69 | HKEY hkey,
|
|---|
| 70 | LPSTR lpValueName,
|
|---|
| 71 | LPDWORD lpReserved,
|
|---|
| 72 | LPDWORD lpType,
|
|---|
| 73 | LPBYTE lpData,
|
|---|
| 74 | LPDWORD lpcbData)
|
|---|
| 75 | {
|
|---|
| 76 | TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
|---|
| 77 | return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 | /*************************************************************************
|
|---|
| 81 | * SHRegQueryValueW [NT4.0:SHELL32.510]
|
|---|
| 82 | *
|
|---|
| 83 | */
|
|---|
| 84 | HRESULT WINAPI SHRegQueryValueW(
|
|---|
| 85 | HKEY hkey,
|
|---|
| 86 | LPWSTR lpszSubKey,
|
|---|
| 87 | LPWSTR lpszData,
|
|---|
| 88 | LPDWORD lpcbData )
|
|---|
| 89 | {
|
|---|
| 90 | WARN("0x%04x %s %p %p semi-stub\n",
|
|---|
| 91 | hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
|
|---|
| 92 | return RegQueryValueW( hkey, lpszSubKey, lpszData, (LPLONG)lpcbData );
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | /*************************************************************************
|
|---|
| 96 | * SHRegQueryValueExW [NT4.0:SHELL32.511]
|
|---|
| 97 | *
|
|---|
| 98 | * FIXME
|
|---|
| 99 | * if the datatype REG_EXPAND_SZ then expand the string and change
|
|---|
| 100 | * *pdwType to REG_SZ.
|
|---|
| 101 | */
|
|---|
| 102 | HRESULT WINAPI SHRegQueryValueExW (
|
|---|
| 103 | HKEY hkey,
|
|---|
| 104 | LPWSTR pszValue,
|
|---|
| 105 | LPDWORD pdwReserved,
|
|---|
| 106 | LPDWORD pdwType,
|
|---|
| 107 | LPVOID pvData,
|
|---|
| 108 | LPDWORD pcbData)
|
|---|
| 109 | {
|
|---|
| 110 | DWORD ret;
|
|---|
| 111 | WARN("0x%04x %s %p %p %p %p semi-stub\n",
|
|---|
| 112 | hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
|
|---|
| 113 | ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, (LPBYTE)pvData, pcbData);
|
|---|
| 114 | return ret;
|
|---|
| 115 | }
|
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 | /*****************************************************************************
|
|---|
| 119 | * Name : HRESULT SHRegDeleteKeyW
|
|---|
| 120 | * Purpose :
|
|---|
| 121 | * Parameters:
|
|---|
| 122 | * Variables :
|
|---|
| 123 | * Result :
|
|---|
| 124 | * Remark : SHELL32.512
|
|---|
| 125 | * Status : UNTESTED STUB
|
|---|
| 126 | *
|
|---|
| 127 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
|---|
| 128 | *****************************************************************************/
|
|---|
| 129 |
|
|---|
| 130 | ODINFUNCTION2(HRESULT, SHRegDeleteKeyW,
|
|---|
| 131 | HKEY, hkey,
|
|---|
| 132 | LPWSTR, lpszKey)
|
|---|
| 133 | {
|
|---|
| 134 | return RegDeleteKeyW(hkey,
|
|---|
| 135 | lpszKey);
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 | /*************************************************************************
|
|---|
| 140 | * SHRegCloseKey [NT4.0:SHELL32.505]
|
|---|
| 141 | *
|
|---|
| 142 | */
|
|---|
| 143 | HRESULT WINAPI SHRegCloseKey (HKEY hkey)
|
|---|
| 144 | {
|
|---|
| 145 | TRACE("0x%04x\n",hkey);
|
|---|
| 146 | return RegCloseKey( hkey );
|
|---|
| 147 | }
|
|---|