source: trunk/src/shlwapi/reg.cpp@ 3687

Last change on this file since 3687 was 3687, checked in by phaller, 25 years ago

.

File size: 8.1 KB
Line 
1/* $Id: reg.cpp,v 1.2 2000-06-12 08:09:39 phaller Exp $ */
2
3/*
4 * Win32 URL-handling APIs for OS/2
5 *
6 * Copyright 1999 Patrick Haller <phaller@gmx.net>
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 * Copyright 1996,1998 Marcus Meissner
11 * Copyright 1996 Jukka Iivonen
12 * Copyright 1997 Uwe Bonnes
13 * Copyright 1999 Jens Wiessner
14 */
15
16
17#include <odin.h>
18#include <odinwrap.h>
19#include <os2sel.h>
20
21#include <string.h>
22#include <ctype.h>
23#include <wctype.h>
24#define HAVE_WCTYPE_H
25#include <odin.h>
26
27#include "debugtools.h"
28#include "winnls.h"
29#include "winversion.h"
30#include "winreg.h"
31
32#include <heapstring.h>
33#include <misc.h>
34#include <win\winerror.h>
35#include "shlwapi.h"
36
37
38ODINDEBUGCHANNEL(SHLWAPI-REG)
39
40
41/*****************************************************************************
42 * Name : DWORD SHRegCreateUSKeyA
43 * Purpose :
44 * Parameters:
45 * Variables :
46 * Result :
47 * Remark : SHLWAPI.594 SHLWAPI.SHRegCreateUSKeyA
48 * Status : UNTESTED
49 *
50 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
51 *****************************************************************************/
52
53ODINFUNCTION5(DWORD, SHRegCreateUSKeyA,
54 LPSTR, lpszKeyName,
55 DWORD, arg1,
56 DWORD, arg2,
57 DWORD, arg3,
58 DWORD, arg4)
59{
60 dprintf(("not implemented\n"));
61 return 0;
62}
63
64
65/*****************************************************************************
66 * Name : DWORD SHRegCreateUSKeyW
67 * Purpose :
68 * Parameters:
69 * Variables :
70 * Result :
71 * Remark : SHLWAPI.595 SHLWAPI.SHRegCreateUSKeyW
72 * Status : UNTESTED
73 *
74 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
75 *****************************************************************************/
76
77ODINFUNCTION5(DWORD, SHRegCreateUSKeyW,
78 LPWSTR, lpszKeyName,
79 DWORD, arg1,
80 DWORD, arg2,
81 DWORD, arg3,
82 DWORD, arg4)
83{
84 char szBuffer[256];
85
86 // convert unicode to ascii
87 if (0 == WideCharToMultiByte(0,
88 0,
89 lpszKeyName,
90 -1,
91 szBuffer,
92 sizeof(szBuffer),
93 0,
94 0))
95 return GetLastError();
96
97 return SHRegCreateUSKeyA(szBuffer,
98 arg1,
99 arg2,
100 arg3,
101 arg4);
102}
103
104
105
106/*
107 shlwapi functions that have found their way in because most of
108 shlwapi is unimplemented and doesn't have a home.
109
110 FIXME: move to a more appropriate file( when one exists )
111*/
112
113 /* SHGetValue: Gets a value from the registry */
114
115ODINFUNCTION6(DWORD,SHGetValueA,HKEY, hkey,
116 LPCSTR, pSubKey,
117 LPCSTR, pValue,
118 LPDWORD, pwType,
119 LPVOID, pvData,
120 LPDWORD, pbData)
121{
122 dprintf(("(%p),stub!\n", pSubKey));
123
124 return ERROR_SUCCESS; /* return success */
125}
126
127ODINFUNCTION6(DWORD,SHGetValueW,HKEY, hkey,
128 LPCWSTR, pSubKey,
129 LPCWSTR, pValue,
130 LPDWORD, pwType,
131 LPVOID, pvData,
132 LPDWORD, pbData)
133{
134 dprintf(("(%p),stub!\n", pSubKey));
135
136 return ERROR_SUCCESS; /* return success */
137}
138
139/* gets a user-specific registry value. */
140
141ODINFUNCTION8(LONG,SHRegGetUSValueA,LPCSTR, pSubKey,
142 LPCSTR, pValue,
143 LPDWORD, pwType,
144 LPVOID, pvData,
145 LPDWORD, pbData,
146 BOOL, fIgnoreHKCU,
147 LPVOID, pDefaultData,
148 DWORD, wDefaultDataSize)
149{
150 FIXME("(%p),stub!\n", pSubKey);
151
152 return ERROR_SUCCESS; /* return success */
153}
154
155ODINFUNCTION8(LONG,SHRegGetUSValueW,LPCWSTR, pSubKey,
156 LPCWSTR, pValue,
157 LPDWORD, pwType,
158 LPVOID, pvData,
159 LPDWORD, pbData,
160 BOOL, flagIgnoreHKCU,
161 LPVOID, pDefaultData,
162 DWORD, wDefaultDataSize)
163{
164 dprintf(("(%p),stub!\n", pSubKey));
165
166 return ERROR_SUCCESS; /* return success */
167}
168
169
170/*****************************************************************************
171 * Name : DWORD SHRegGetBoolUSValueA
172 * Purpose : unknown
173 * Parameters: unknown
174 * Variables :
175 * Result : unknown
176 * Remark : SHLWAPI.SHRegGetBoolUSValueA
177 * Status : UNTESTED
178 *
179 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
180 *****************************************************************************/
181
182ODINFUNCTION5(LONG, SHRegGetBoolUSValueA,
183 LPCSTR, pSubKey,
184 DWORD, arg2,
185 DWORD, arg3,
186 DWORD, arg4,
187 DWORD, arg5)
188{
189 char szBuffer[264];
190 int iLength;
191
192 dprintf(("(%p),stub!\n", pSubKey));
193
194 return ERROR_SUCCESS; /* return success */
195}
196
197
198/*****************************************************************************
199 * Name : DWORD SHRegGetBoolUSValueW
200 * Purpose : unknown
201 * Parameters: unknown
202 * Variables :
203 * Result : unknown
204 * Remark : SHLWAPI.SHRegGetBoolUSValueW
205 * Status : UNTESTED
206 *
207 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
208 *****************************************************************************/
209
210ODINFUNCTION5(LONG, SHRegGetBoolUSValueW,
211 LPCWSTR, pSubKey,
212 DWORD, arg2,
213 DWORD, arg3,
214 DWORD, arg4,
215 DWORD, arg5)
216{
217 char szBuffer[264];
218 int iLength;
219
220 dprintf(("(%p),stub!\n", pSubKey));
221
222 return ERROR_SUCCESS; /* return success */
223}
224
225
226/*****************************************************************************
227 * Name : DWORD SHRegSetUSValueA
228 * Purpose :
229 * Parameters:
230 * Variables :
231 * Result :
232 * Remark : SHLWAPI.SHRegSetUSValueA SHLWAPI.615
233 * Status : UNTESTED
234 *
235 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
236 *****************************************************************************/
237
238ODINFUNCTION6(LONG, SHRegSetUSValueA,
239 HKEY, hKey,
240 DWORD, arg2,
241 DWORD, arg3,
242 DWORD, arg4,
243 DWORD, arg5,
244 DWORD, arg6)
245{
246 LONG rc;
247
248#if 0
249 rc = SHRegCreateUSKeyA(hKey,
250 3,
251 0,
252 &hKey);
253 if (rc == ERROR_SUCCESS)
254 {
255 rc = SHRegWriteUSValueA(hKey,
256 arg2,
257 arg3,
258 arg4,
259 arg5,
260 arg6);
261 SHRegCloseUSKey(hKey);
262 }
263#endif
264
265 return rc;
266}
267
268
269
270
271/*****************************************************************************
272 * Name : DWORD SHRegSetUSValueW
273 * Purpose :
274 * Parameters:
275 * Variables :
276 * Result :
277 * Remark : SHLWAPI.SHRegSetUSValueW SHLWAPI.616
278 * Status : UNTESTED
279 *
280 * Author : Patrick Haller [Wed, 1999/12/29 23:02]
281 *****************************************************************************/
282
283ODINFUNCTION6(LONG, SHRegSetUSValueW,
284 HKEY, hKey,
285 DWORD, arg2,
286 DWORD, arg3,
287 DWORD, arg4,
288 DWORD, arg5,
289 DWORD, arg6)
290{
291 LONG rc;
292
293#if 0
294 rc = SHRegCreateUSKeyW(hKey,
295 3,
296 0,
297 &hKey);
298 if (rc == ERROR_SUCCESS)
299 {
300 rc = SHRegWriteUSValueW(hKey,
301 arg2,
302 arg3,
303 arg4,
304 arg5,
305 arg6);
306 SHRegCloseUSKey(hKey);
307 }
308#endif
309
310 return rc;
311}
312
313
Note: See TracBrowser for help on using the repository browser.