1 | /* $Id: registry.cpp,v 1.13 2002-02-08 15:09:30 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 registry API functions for OS/2
|
---|
5 | *
|
---|
6 | * 1998/06/12
|
---|
7 | *
|
---|
8 | * Copyright 1998 Sander van Leeuwen
|
---|
9 | * Copyright 1998 Patrick Haller
|
---|
10 | *
|
---|
11 | *
|
---|
12 | * TODO: Many unicode apis are still wrong (missing unicode conversions and wrong sizes)!!!!!
|
---|
13 | *
|
---|
14 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*****************************************************************************
|
---|
20 | * Includes *
|
---|
21 | *****************************************************************************/
|
---|
22 |
|
---|
23 | #include <odin.h>
|
---|
24 | #include <odinwrap.h>
|
---|
25 | #include <os2sel.h>
|
---|
26 |
|
---|
27 | #include <os2win.h>
|
---|
28 | #include <stdlib.h>
|
---|
29 | #include <stdarg.h>
|
---|
30 | #include <string.h>
|
---|
31 | #include <odinwrap.h>
|
---|
32 | #include <misc.h>
|
---|
33 | #include "unicode.h"
|
---|
34 | #include <winreg.h>
|
---|
35 | #include <heapstring.h>
|
---|
36 |
|
---|
37 | #define DBG_LOCALLOG DBG_registry
|
---|
38 | #include "dbglocal.h"
|
---|
39 |
|
---|
40 |
|
---|
41 | ODINDEBUGCHANNEL(ADVAPI32-REGISTRY)
|
---|
42 |
|
---|
43 |
|
---|
44 | /*****************************************************************************
|
---|
45 | * Defines *
|
---|
46 | *****************************************************************************/
|
---|
47 |
|
---|
48 | /* this define enables certain less important debug messages */
|
---|
49 | //#define DEBUG_LOCAL 1
|
---|
50 |
|
---|
51 |
|
---|
52 | static HKEY hKeyClassesRoot = HKEY_CLASSES_ROOT_O32;
|
---|
53 | static HKEY hKeyCurrentUser = HKEY_CURRENT_USER_O32;
|
---|
54 | static HKEY hKeyLocalMachine = HKEY_LOCAL_MACHINE_O32;
|
---|
55 | static HKEY hKeyUsers = HKEY_USERS_O32;
|
---|
56 |
|
---|
57 | /*****************************************************************************
|
---|
58 | * Name : Convert Key
|
---|
59 | * Purpose : convert key handle values between win32 and os/2
|
---|
60 | * Parameters: HKEY winkey - the win32 key handle value
|
---|
61 | * Variables :
|
---|
62 | * Result : the os/2 warp registry key handle value
|
---|
63 | * Remark :
|
---|
64 | * Status : UNTESTED STUB
|
---|
65 | *
|
---|
66 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
67 | *****************************************************************************/
|
---|
68 |
|
---|
69 | static HKEY ConvertKey(HKEY winkey)
|
---|
70 | {
|
---|
71 | switch((DWORD)winkey)
|
---|
72 | {
|
---|
73 | case HKEY_CLASSES_ROOT: return hKeyClassesRoot;
|
---|
74 | case HKEY_CURRENT_USER: return hKeyCurrentUser;
|
---|
75 | case HKEY_LOCAL_MACHINE: return hKeyLocalMachine;
|
---|
76 | case HKEY_USERS: return hKeyUsers;
|
---|
77 | }
|
---|
78 | return(winkey);
|
---|
79 | }
|
---|
80 |
|
---|
81 | void WIN32API SetRegistryRootKey(HKEY hRootkey, HKEY hKey)
|
---|
82 | {
|
---|
83 | switch((DWORD)hRootkey)
|
---|
84 | {
|
---|
85 | case HKEY_CLASSES_ROOT:
|
---|
86 | hKeyClassesRoot = hKey;
|
---|
87 | break;
|
---|
88 | case HKEY_CURRENT_USER:
|
---|
89 | hKeyCurrentUser = hKey;
|
---|
90 | break;
|
---|
91 | case HKEY_LOCAL_MACHINE:
|
---|
92 | hKeyLocalMachine = hKey;
|
---|
93 | break;
|
---|
94 | case HKEY_USERS:
|
---|
95 | hKeyUsers = hKey;
|
---|
96 | break;
|
---|
97 | }
|
---|
98 | }
|
---|
99 |
|
---|
100 | /*****************************************************************************
|
---|
101 | * Name :
|
---|
102 | * Purpose :
|
---|
103 | * Parameters:
|
---|
104 | * Variables :
|
---|
105 | * Result :
|
---|
106 | * Remark :
|
---|
107 | * Status : CORRECTED UNTESTED
|
---|
108 | *
|
---|
109 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
110 | *****************************************************************************/
|
---|
111 |
|
---|
112 | LONG WIN32API RegCloseKey(HKEY hKey)
|
---|
113 | {
|
---|
114 | return O32_RegCloseKey(ConvertKey(hKey));
|
---|
115 | }
|
---|
116 |
|
---|
117 |
|
---|
118 | /*****************************************************************************
|
---|
119 | * Name :
|
---|
120 | * Purpose :
|
---|
121 | * Parameters:
|
---|
122 | * Variables :
|
---|
123 | * Result :
|
---|
124 | * Remark :
|
---|
125 | * Status : CORRECTED UNTESTED
|
---|
126 | *
|
---|
127 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
128 | *****************************************************************************/
|
---|
129 |
|
---|
130 | LONG WIN32API RegCreateKeyA(HKEY hKey, LPCSTR lpszSubKey, PHKEY phkResult)
|
---|
131 | {
|
---|
132 | dprintf(("RegCreateKeyA %x %s", hKey, lpszSubKey));
|
---|
133 | return O32_RegCreateKey(ConvertKey(hKey),
|
---|
134 | lpszSubKey,
|
---|
135 | phkResult);
|
---|
136 | }
|
---|
137 |
|
---|
138 |
|
---|
139 | /*****************************************************************************
|
---|
140 | * Name :
|
---|
141 | * Purpose :
|
---|
142 | * Parameters:
|
---|
143 | * Variables :
|
---|
144 | * Result :
|
---|
145 | * Remark :
|
---|
146 | * Status : CORRECTED UNTESTED
|
---|
147 | *
|
---|
148 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
149 | *****************************************************************************/
|
---|
150 |
|
---|
151 | LONG WIN32API RegCreateKeyW(HKEY hKey, LPCWSTR lpszSubKey, PHKEY phkResult)
|
---|
152 | {
|
---|
153 | char *astring = UnicodeToAsciiString((LPWSTR)lpszSubKey);
|
---|
154 | LONG rc;
|
---|
155 |
|
---|
156 | dprintf(("RegCreateKeyW %x %s", hKey, astring));
|
---|
157 | rc = O32_RegCreateKey(ConvertKey(hKey),
|
---|
158 | astring,
|
---|
159 | phkResult);
|
---|
160 |
|
---|
161 | FreeAsciiString(astring);
|
---|
162 | return(rc);
|
---|
163 | }
|
---|
164 |
|
---|
165 |
|
---|
166 | /*****************************************************************************
|
---|
167 | * Name :
|
---|
168 | * Purpose :
|
---|
169 | * Parameters:
|
---|
170 | * Variables :
|
---|
171 | * Result :
|
---|
172 | * Remark :
|
---|
173 | * Status : CORRECTED UNTESTED
|
---|
174 | *
|
---|
175 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
176 | *****************************************************************************/
|
---|
177 |
|
---|
178 | LONG WIN32API RegCreateKeyExA(HKEY hKey,
|
---|
179 | LPCSTR lpszSubKey,
|
---|
180 | DWORD dwReserved,
|
---|
181 | LPSTR lpszClass,
|
---|
182 | DWORD fdwOptions,
|
---|
183 | REGSAM samDesired,
|
---|
184 | LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
---|
185 | PHKEY phkResult,
|
---|
186 | LPDWORD lpdwDisposition)
|
---|
187 | {
|
---|
188 | dprintf(("RegCreateKeyExA %x %s", hKey, lpszSubKey));
|
---|
189 |
|
---|
190 | return O32_RegCreateKeyEx(ConvertKey(hKey),
|
---|
191 | lpszSubKey,
|
---|
192 | dwReserved,
|
---|
193 | lpszClass,
|
---|
194 | fdwOptions,
|
---|
195 | samDesired, // | KEY_READ
|
---|
196 | lpSecurityAttributes,
|
---|
197 | phkResult,
|
---|
198 | lpdwDisposition);
|
---|
199 | }
|
---|
200 |
|
---|
201 |
|
---|
202 | /*****************************************************************************
|
---|
203 | * Name :
|
---|
204 | * Purpose :
|
---|
205 | * Parameters:
|
---|
206 | * Variables :
|
---|
207 | * Result :
|
---|
208 | * Remark :
|
---|
209 | * Status : CORRECTED UNTESTED
|
---|
210 | *
|
---|
211 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
212 | *****************************************************************************/
|
---|
213 |
|
---|
214 | LONG WIN32API RegCreateKeyExW(HKEY hKey,
|
---|
215 | LPCWSTR lpszSubKey,
|
---|
216 | DWORD dwReserved,
|
---|
217 | LPWSTR lpszClass,
|
---|
218 | DWORD fdwOptions,
|
---|
219 | REGSAM samDesired,
|
---|
220 | LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
---|
221 | PHKEY phkResult,
|
---|
222 | LPDWORD lpdwDisposition)
|
---|
223 | {
|
---|
224 | char *astring1 = UnicodeToAsciiString((LPWSTR)lpszSubKey);
|
---|
225 | char *astring2 = UnicodeToAsciiString(lpszClass);
|
---|
226 | LONG rc;
|
---|
227 |
|
---|
228 | dprintf(("RegCreateKeyExW %x %s", hKey, astring1));
|
---|
229 |
|
---|
230 | rc = O32_RegCreateKeyEx(ConvertKey(hKey),
|
---|
231 | astring1,
|
---|
232 | dwReserved,
|
---|
233 | astring2,
|
---|
234 | fdwOptions,
|
---|
235 | samDesired, // | KEY_READ
|
---|
236 | lpSecurityAttributes,
|
---|
237 | phkResult,
|
---|
238 | lpdwDisposition);
|
---|
239 |
|
---|
240 | FreeAsciiString(astring1);
|
---|
241 | FreeAsciiString(astring2);
|
---|
242 | return(rc);
|
---|
243 | }
|
---|
244 |
|
---|
245 |
|
---|
246 | /*****************************************************************************
|
---|
247 | * Name :
|
---|
248 | * Purpose :
|
---|
249 | * Parameters:
|
---|
250 | * Variables :
|
---|
251 | * Result :
|
---|
252 | * Remark :
|
---|
253 | * Status : CORRECTED UNTESTED
|
---|
254 | *
|
---|
255 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
256 | *****************************************************************************/
|
---|
257 |
|
---|
258 | LONG WIN32API RegDeleteKeyW(HKEY hKey, LPWSTR lpszSubKey)
|
---|
259 | {
|
---|
260 | char *astring = UnicodeToAsciiString(lpszSubKey);
|
---|
261 | LONG rc;
|
---|
262 |
|
---|
263 | dprintf(("RegDeleteKeyW %s", astring));
|
---|
264 | rc = O32_RegDeleteKey(ConvertKey(hKey),
|
---|
265 | astring);
|
---|
266 | FreeAsciiString(astring);
|
---|
267 | return(rc);
|
---|
268 | }
|
---|
269 |
|
---|
270 |
|
---|
271 | /*****************************************************************************
|
---|
272 | * Name :
|
---|
273 | * Purpose :
|
---|
274 | * Parameters:
|
---|
275 | * Variables :
|
---|
276 | * Result :
|
---|
277 | * Remark :
|
---|
278 | * Status : CORRECTED UNTESTED
|
---|
279 | *
|
---|
280 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
281 | *****************************************************************************/
|
---|
282 |
|
---|
283 | LONG WIN32API RegDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
|
---|
284 | {
|
---|
285 | dprintf(("RegDeleteKeyW %s", lpszSubKey));
|
---|
286 | return O32_RegDeleteKey(ConvertKey(hKey), lpszSubKey);
|
---|
287 | }
|
---|
288 |
|
---|
289 |
|
---|
290 | /*****************************************************************************
|
---|
291 | * Name :
|
---|
292 | * Purpose :
|
---|
293 | * Parameters:
|
---|
294 | * Variables :
|
---|
295 | * Result :
|
---|
296 | * Remark :
|
---|
297 | * Status : CORRECTED UNTESTED
|
---|
298 | *
|
---|
299 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
300 | *****************************************************************************/
|
---|
301 |
|
---|
302 | LONG WIN32API RegDeleteValueA(HKEY hKey, LPSTR lpszValue)
|
---|
303 | {
|
---|
304 | return O32_RegDeleteValue(ConvertKey(hKey),
|
---|
305 | lpszValue);
|
---|
306 | }
|
---|
307 |
|
---|
308 |
|
---|
309 | /*****************************************************************************
|
---|
310 | * Name :
|
---|
311 | * Purpose :
|
---|
312 | * Parameters:
|
---|
313 | * Variables :
|
---|
314 | * Result :
|
---|
315 | * Remark :
|
---|
316 | * Status : CORRECTED UNTESTED
|
---|
317 | *
|
---|
318 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
319 | *****************************************************************************/
|
---|
320 |
|
---|
321 | LONG WIN32API RegDeleteValueW(HKEY hKey, LPWSTR lpszValue)
|
---|
322 | {
|
---|
323 | char *astring = UnicodeToAsciiString(lpszValue);
|
---|
324 | LONG rc;
|
---|
325 |
|
---|
326 | rc = O32_RegDeleteValue(ConvertKey(hKey),
|
---|
327 | astring);
|
---|
328 | FreeAsciiString(astring);
|
---|
329 | return(rc);
|
---|
330 | }
|
---|
331 |
|
---|
332 |
|
---|
333 | /*****************************************************************************
|
---|
334 | * Name :
|
---|
335 | * Purpose :
|
---|
336 | * Parameters:
|
---|
337 | * Variables :
|
---|
338 | * Result :
|
---|
339 | * Remark :
|
---|
340 | * Status : UNTESTED STUB
|
---|
341 | *
|
---|
342 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
343 | *****************************************************************************/
|
---|
344 |
|
---|
345 | LONG WIN32API RegEnumKeyA(HKEY hKey, DWORD iSubKey, LPSTR lpszName,
|
---|
346 | DWORD cchName)
|
---|
347 | {
|
---|
348 | return O32_RegEnumKey(ConvertKey(hKey),
|
---|
349 | iSubKey,
|
---|
350 | lpszName,
|
---|
351 | cchName);
|
---|
352 | }
|
---|
353 |
|
---|
354 |
|
---|
355 | /*****************************************************************************
|
---|
356 | * Name :
|
---|
357 | * Purpose :
|
---|
358 | * Parameters:
|
---|
359 | * Variables :
|
---|
360 | * Result :
|
---|
361 | * Remark :
|
---|
362 | * Status : UNTESTED STUB
|
---|
363 | *
|
---|
364 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
365 | *****************************************************************************/
|
---|
366 |
|
---|
367 | LONG WIN32API RegEnumKeyW(HKEY hKey, DWORD iSubKey, LPWSTR lpszName,
|
---|
368 | DWORD cchName)
|
---|
369 | {
|
---|
370 | char *astring;
|
---|
371 | LONG rc;
|
---|
372 |
|
---|
373 | rc = O32_RegEnumKey(ConvertKey(hKey),
|
---|
374 | iSubKey,
|
---|
375 | (char *)lpszName,
|
---|
376 | cchName);
|
---|
377 | if(rc == ERROR_SUCCESS)
|
---|
378 | {
|
---|
379 | astring = (char *)malloc(cchName);
|
---|
380 | strcpy(astring, (char *)lpszName);
|
---|
381 | AsciiToUnicode(astring, lpszName);
|
---|
382 | free(astring);
|
---|
383 | }
|
---|
384 | return(rc);
|
---|
385 | }
|
---|
386 |
|
---|
387 |
|
---|
388 | /*****************************************************************************
|
---|
389 | * Name :
|
---|
390 | * Purpose :
|
---|
391 | * Parameters:
|
---|
392 | * Variables :
|
---|
393 | * Result :
|
---|
394 | * Remark :
|
---|
395 | * Status : UNTESTED STUB
|
---|
396 | *
|
---|
397 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
398 | *****************************************************************************/
|
---|
399 |
|
---|
400 | LONG WIN32API RegEnumKeyExA(HKEY arg1,
|
---|
401 | DWORD arg2,
|
---|
402 | LPSTR arg3,
|
---|
403 | LPDWORD arg4,
|
---|
404 | LPDWORD arg5,
|
---|
405 | LPSTR arg6,
|
---|
406 | LPDWORD arg7,
|
---|
407 | LPFILETIME arg8)
|
---|
408 | {
|
---|
409 | return O32_RegEnumKeyEx(ConvertKey(arg1),
|
---|
410 | arg2,
|
---|
411 | arg3,
|
---|
412 | arg4,
|
---|
413 | arg5,
|
---|
414 | arg6,
|
---|
415 | arg7,
|
---|
416 | arg8);
|
---|
417 | }
|
---|
418 |
|
---|
419 |
|
---|
420 | /*****************************************************************************
|
---|
421 | * Name :
|
---|
422 | * Purpose :
|
---|
423 | * Parameters:
|
---|
424 | * Variables :
|
---|
425 | * Result :
|
---|
426 | * Remark :
|
---|
427 | * Status : UNTESTED STUB
|
---|
428 | *
|
---|
429 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
430 | *****************************************************************************/
|
---|
431 |
|
---|
432 | LONG WIN32API RegEnumKeyExW(HKEY hKey,
|
---|
433 | DWORD iSubkey,
|
---|
434 | LPWSTR lpszName,
|
---|
435 | LPDWORD lpcchName,
|
---|
436 | LPDWORD lpdwReserved,
|
---|
437 | LPWSTR lpszClass,
|
---|
438 | LPDWORD lpcchClass,
|
---|
439 | LPFILETIME lpffLastWrite)
|
---|
440 | {
|
---|
441 | char *astring;
|
---|
442 | LONG rc;
|
---|
443 |
|
---|
444 | rc = O32_RegEnumKeyEx(ConvertKey(hKey),
|
---|
445 | iSubkey,
|
---|
446 | (char *)lpszName,
|
---|
447 | lpcchName,
|
---|
448 | lpdwReserved,
|
---|
449 | (char *)lpszClass,
|
---|
450 | lpcchClass,
|
---|
451 | lpffLastWrite);
|
---|
452 | if(rc == ERROR_SUCCESS)
|
---|
453 | {
|
---|
454 | astring = (char *)malloc(max(*lpcchName+1, (lpcchClass) ? (*lpcchClass+1) : 0)); //class & keyname
|
---|
455 | strcpy(astring, (char *)lpszName);
|
---|
456 | AsciiToUnicode(astring, lpszName);
|
---|
457 | if(lpszClass != NULL)
|
---|
458 | {
|
---|
459 | strcpy(astring, (char *)lpszClass);
|
---|
460 | AsciiToUnicode(astring, lpszClass);
|
---|
461 | }
|
---|
462 | free(astring);
|
---|
463 | }
|
---|
464 | return(rc);
|
---|
465 | }
|
---|
466 |
|
---|
467 |
|
---|
468 | /*****************************************************************************
|
---|
469 | * Name :
|
---|
470 | * Purpose :
|
---|
471 | * Parameters:
|
---|
472 | * Variables :
|
---|
473 | * Result :
|
---|
474 | * Remark :
|
---|
475 | * Status : UNTESTED STUB
|
---|
476 | *
|
---|
477 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
478 | *****************************************************************************/
|
---|
479 |
|
---|
480 | LONG WIN32API RegEnumValueA(HKEY arg1,
|
---|
481 | DWORD arg2,
|
---|
482 | LPSTR arg3,
|
---|
483 | LPDWORD arg4,
|
---|
484 | LPDWORD arg5,
|
---|
485 | LPDWORD arg6,
|
---|
486 | LPBYTE arg7,
|
---|
487 | LPDWORD arg8)
|
---|
488 | {
|
---|
489 | return O32_RegEnumValue(ConvertKey(arg1),
|
---|
490 | arg2,
|
---|
491 | arg3,
|
---|
492 | arg4,
|
---|
493 | arg5,
|
---|
494 | arg6,
|
---|
495 | arg7,
|
---|
496 | arg8);
|
---|
497 | }
|
---|
498 |
|
---|
499 |
|
---|
500 | /*****************************************************************************
|
---|
501 | * Name :
|
---|
502 | * Purpose :
|
---|
503 | * Parameters:
|
---|
504 | * Variables :
|
---|
505 | * Result :
|
---|
506 | * Remark :
|
---|
507 | * Status : UNTESTED STUB
|
---|
508 | *
|
---|
509 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
510 | *****************************************************************************/
|
---|
511 |
|
---|
512 | LONG WIN32API RegEnumValueW(HKEY hkey,
|
---|
513 | DWORD iValue,
|
---|
514 | LPWSTR lpszValue,
|
---|
515 | LPDWORD lpcchValue,
|
---|
516 | LPDWORD lpdwReserved,
|
---|
517 | LPDWORD lpdwType,
|
---|
518 | LPBYTE lpbData,
|
---|
519 | LPDWORD lpcbData)
|
---|
520 | {
|
---|
521 | char *astring;
|
---|
522 | LONG rc, oldsize = 0;
|
---|
523 |
|
---|
524 | if(lpcbData) {
|
---|
525 | oldsize = *lpcbData;
|
---|
526 | }
|
---|
527 | rc = O32_RegEnumValue(ConvertKey(hkey),
|
---|
528 | iValue,
|
---|
529 | (char *)lpszValue,
|
---|
530 | lpcchValue,
|
---|
531 | lpdwReserved,
|
---|
532 | lpdwType,
|
---|
533 | lpbData,
|
---|
534 | lpcbData);
|
---|
535 | if(rc == ERROR_SUCCESS)
|
---|
536 | {
|
---|
537 | astring = (char *)malloc(*lpcchValue+1); //+ 0 terminator
|
---|
538 | strcpy(astring, (char *)lpszValue);
|
---|
539 | AsciiToUnicode(astring, lpszValue);
|
---|
540 | free(astring);
|
---|
541 |
|
---|
542 | if(lpcbData && lpbData)
|
---|
543 | {
|
---|
544 | switch(*lpdwType) {
|
---|
545 | case REG_SZ:
|
---|
546 | case REG_EXPAND_SZ:
|
---|
547 | if(oldsize < *lpcbData*sizeof(WCHAR)) {
|
---|
548 | *lpcbData = *lpcbData*sizeof(WCHAR);
|
---|
549 | return ERROR_MORE_DATA;
|
---|
550 | }
|
---|
551 | astring = (char *)malloc(*lpcbData);
|
---|
552 | strcpy(astring, (char *)lpbData);
|
---|
553 | lstrcpyAtoW((LPWSTR)lpbData, astring);
|
---|
554 | free(astring);
|
---|
555 | break;
|
---|
556 | case REG_MULTI_SZ:
|
---|
557 | case REG_LINK: //???
|
---|
558 | dprintf(("ERROR: key data must be translated from Unicode to Ascii!!"));
|
---|
559 | break;
|
---|
560 | default:
|
---|
561 | break;
|
---|
562 | }
|
---|
563 | }
|
---|
564 |
|
---|
565 | }
|
---|
566 | return(rc);
|
---|
567 | }
|
---|
568 |
|
---|
569 |
|
---|
570 | /*****************************************************************************
|
---|
571 | * Name :
|
---|
572 | * Purpose :
|
---|
573 | * Parameters:
|
---|
574 | * Variables :
|
---|
575 | * Result :
|
---|
576 | * Remark :
|
---|
577 | * Status : UNTESTED STUB
|
---|
578 | *
|
---|
579 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
580 | *****************************************************************************/
|
---|
581 |
|
---|
582 | LONG WIN32API RegOpenKeyA(HKEY hKey, LPCSTR arg2, PHKEY arg3)
|
---|
583 | {
|
---|
584 | LONG rc;
|
---|
585 |
|
---|
586 | dprintf(("RegOpenKey %s", arg2));
|
---|
587 |
|
---|
588 | rc = O32_RegOpenKey(ConvertKey(hKey),
|
---|
589 | arg2,
|
---|
590 | arg3);
|
---|
591 | if(rc)
|
---|
592 | *arg3 = 0;
|
---|
593 |
|
---|
594 | return(rc);
|
---|
595 | }
|
---|
596 |
|
---|
597 |
|
---|
598 | /*****************************************************************************
|
---|
599 | * Name :
|
---|
600 | * Purpose :
|
---|
601 | * Parameters:
|
---|
602 | * Variables :
|
---|
603 | * Result :
|
---|
604 | * Remark :
|
---|
605 | * Status : UNTESTED STUB
|
---|
606 | *
|
---|
607 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
608 | *****************************************************************************/
|
---|
609 |
|
---|
610 | LONG WIN32API RegOpenKeyW(HKEY hKey, LPCWSTR arg2, PHKEY arg3)
|
---|
611 | {
|
---|
612 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
613 | LONG rc;
|
---|
614 |
|
---|
615 | rc = O32_RegOpenKey(ConvertKey(hKey),
|
---|
616 | astring,
|
---|
617 | arg3);
|
---|
618 | if(rc)
|
---|
619 | *arg3 = 0;
|
---|
620 |
|
---|
621 | FreeAsciiString(astring);
|
---|
622 | return(rc);
|
---|
623 | }
|
---|
624 |
|
---|
625 |
|
---|
626 | /*****************************************************************************
|
---|
627 | * Name :
|
---|
628 | * Purpose :
|
---|
629 | * Parameters:
|
---|
630 | * Variables :
|
---|
631 | * Result :
|
---|
632 | * Remark :
|
---|
633 | * Status : UNTESTED STUB
|
---|
634 | *
|
---|
635 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
636 | *****************************************************************************/
|
---|
637 |
|
---|
638 | LONG WIN32API RegOpenKeyExA(HKEY hKey, LPCSTR arg2, DWORD arg3,
|
---|
639 | REGSAM arg4, PHKEY arg5)
|
---|
640 | {
|
---|
641 | LONG rc;
|
---|
642 |
|
---|
643 | dprintf(("RegOpenKeyEx %s", arg2));
|
---|
644 | rc = O32_RegOpenKeyEx(ConvertKey(hKey),
|
---|
645 | arg2,
|
---|
646 | arg3,
|
---|
647 | arg4,
|
---|
648 | arg5);
|
---|
649 |
|
---|
650 | //SvL: This fixes crashes in pmwinx.dll. (if an app doesn't check the
|
---|
651 | // return value and uses the whatever *arg5 contains)
|
---|
652 | if(rc)
|
---|
653 | *arg5 = 0;
|
---|
654 |
|
---|
655 | return(rc);
|
---|
656 | }
|
---|
657 |
|
---|
658 |
|
---|
659 | /*****************************************************************************
|
---|
660 | * Name :
|
---|
661 | * Purpose :
|
---|
662 | * Parameters:
|
---|
663 | * Variables :
|
---|
664 | * Result :
|
---|
665 | * Remark :
|
---|
666 | * Status : UNTESTED STUB
|
---|
667 | *
|
---|
668 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
669 | *****************************************************************************/
|
---|
670 |
|
---|
671 | LONG WIN32API RegOpenKeyExW(HKEY arg1,
|
---|
672 | LPCWSTR arg2,
|
---|
673 | DWORD arg3,
|
---|
674 | REGSAM arg4,
|
---|
675 | PHKEY arg5)
|
---|
676 | {
|
---|
677 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
678 | LONG rc;
|
---|
679 |
|
---|
680 | rc = RegOpenKeyExA(arg1, astring, arg3, arg4, arg5);
|
---|
681 | //SvL: This fixes crashes in pmwinx.dll. (if an app doesn't check the
|
---|
682 | // return value and uses the whatever *arg5 contains)
|
---|
683 | if(rc)
|
---|
684 | *arg5 = 0;
|
---|
685 |
|
---|
686 | FreeAsciiString(astring);
|
---|
687 | return(rc);
|
---|
688 | }
|
---|
689 |
|
---|
690 |
|
---|
691 | /*****************************************************************************
|
---|
692 | * Name :
|
---|
693 | * Purpose :
|
---|
694 | * Parameters:
|
---|
695 | * Variables :
|
---|
696 | * Result :
|
---|
697 | * Remark :
|
---|
698 | * Status : UNTESTED STUB
|
---|
699 | *
|
---|
700 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
701 | *****************************************************************************/
|
---|
702 |
|
---|
703 | LONG WIN32API RegQueryInfoKeyA(HKEY arg1,
|
---|
704 | LPSTR arg2,
|
---|
705 | LPDWORD arg3,
|
---|
706 | LPDWORD arg4,
|
---|
707 | LPDWORD arg5,
|
---|
708 | LPDWORD arg6,
|
---|
709 | LPDWORD arg7,
|
---|
710 | LPDWORD arg8,
|
---|
711 | LPDWORD arg9,
|
---|
712 | LPDWORD arg10,
|
---|
713 | LPDWORD arg11,
|
---|
714 | LPFILETIME arg12)
|
---|
715 | {
|
---|
716 | return O32_RegQueryInfoKey(ConvertKey(arg1),
|
---|
717 | arg2,
|
---|
718 | arg3,
|
---|
719 | arg4,
|
---|
720 | arg5,
|
---|
721 | arg6,
|
---|
722 | arg7,
|
---|
723 | arg8,
|
---|
724 | arg9,
|
---|
725 | arg10,
|
---|
726 | arg11,
|
---|
727 | arg12);
|
---|
728 | }
|
---|
729 |
|
---|
730 |
|
---|
731 | /*****************************************************************************
|
---|
732 | * Name :
|
---|
733 | * Purpose :
|
---|
734 | * Parameters:
|
---|
735 | * Variables :
|
---|
736 | * Result :
|
---|
737 | * Remark :
|
---|
738 | * Status : UNTESTED STUB
|
---|
739 | *
|
---|
740 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
741 | *****************************************************************************/
|
---|
742 |
|
---|
743 | LONG WIN32API RegQueryInfoKeyW(HKEY hkey,
|
---|
744 | LPWSTR lpszClass,
|
---|
745 | LPDWORD lpcchClass,
|
---|
746 | LPDWORD lpdwReserved,
|
---|
747 | LPDWORD lpcSubKeys,
|
---|
748 | LPDWORD lpcchMaxSubKey,
|
---|
749 | LPDWORD lpcchMaxClass,
|
---|
750 | LPDWORD lpcValues,
|
---|
751 | LPDWORD lpcchMaxValueName,
|
---|
752 | LPDWORD lpcbMaxValueData,
|
---|
753 | LPDWORD lpcbSecurityDescriptor,
|
---|
754 | LPFILETIME lpftLastWriteTime)
|
---|
755 | {
|
---|
756 | char *astring;
|
---|
757 | LONG rc;
|
---|
758 |
|
---|
759 | rc = O32_RegQueryInfoKey(ConvertKey(hkey),
|
---|
760 | (char *)lpszClass,
|
---|
761 | lpcchClass,
|
---|
762 | lpdwReserved,
|
---|
763 | lpcSubKeys,
|
---|
764 | lpcchMaxSubKey,
|
---|
765 | lpcchMaxClass,
|
---|
766 | lpcValues,
|
---|
767 | lpcchMaxValueName,
|
---|
768 | lpcbMaxValueData,
|
---|
769 | lpcbSecurityDescriptor,
|
---|
770 | lpftLastWriteTime);
|
---|
771 | if(rc == ERROR_SUCCESS)
|
---|
772 | {
|
---|
773 | if(*lpcchClass) {
|
---|
774 | astring = (char *)malloc(*lpcchClass+1); //returned length does NOT include 0 terminator
|
---|
775 | strcpy(astring, (char *)lpszClass);
|
---|
776 | AsciiToUnicode(astring, lpszClass);
|
---|
777 | free(astring);
|
---|
778 | }
|
---|
779 | else *lpszClass = 0;
|
---|
780 | }
|
---|
781 | //TODO: lpcbMaxValueData could be wrong for string key values!!! (as it's in bytes)
|
---|
782 | return(rc);
|
---|
783 | }
|
---|
784 |
|
---|
785 |
|
---|
786 | /*****************************************************************************
|
---|
787 | * Name :
|
---|
788 | * Purpose :
|
---|
789 | * Parameters:
|
---|
790 | * Variables :
|
---|
791 | * Result :
|
---|
792 | * Remark :
|
---|
793 | * Status : UNTESTED STUB
|
---|
794 | *
|
---|
795 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
796 | *****************************************************************************/
|
---|
797 |
|
---|
798 | LONG WIN32API RegQueryValueA(HKEY arg1,
|
---|
799 | LPCSTR arg2,
|
---|
800 | LPSTR arg3,
|
---|
801 | PLONG arg4)
|
---|
802 | {
|
---|
803 | dprintf(("ADVAPI32:Registry key=%s\n",
|
---|
804 | arg2));
|
---|
805 | return O32_RegQueryValue(ConvertKey(arg1),
|
---|
806 | arg2,
|
---|
807 | arg3,
|
---|
808 | arg4);
|
---|
809 | }
|
---|
810 |
|
---|
811 |
|
---|
812 | /*****************************************************************************
|
---|
813 | * Name :
|
---|
814 | * Purpose :
|
---|
815 | * Parameters:
|
---|
816 | * Variables :
|
---|
817 | * Result :
|
---|
818 | * Remark :
|
---|
819 | * Status : UNTESTED STUB
|
---|
820 | *
|
---|
821 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
822 | *****************************************************************************/
|
---|
823 |
|
---|
824 | LONG WIN32API RegQueryValueW(HKEY hkey,
|
---|
825 | LPCWSTR lpszSubKey,
|
---|
826 | LPWSTR lpszValue,
|
---|
827 | PLONG pcbValue)
|
---|
828 | {
|
---|
829 | char *astring1 = UnicodeToAsciiString((LPWSTR)lpszSubKey);
|
---|
830 | char *astring2;
|
---|
831 | LONG rc;
|
---|
832 |
|
---|
833 | rc = RegQueryValueA(hkey, astring1, (char *)lpszValue, pcbValue);
|
---|
834 | if(rc == ERROR_SUCCESS)
|
---|
835 | {
|
---|
836 | if(pcbValue) {
|
---|
837 | astring2 = (char *)malloc(*pcbValue); //includes 0 terminator
|
---|
838 | strcpy(astring2, (char *)lpszValue);
|
---|
839 | AsciiToUnicode(astring2, lpszValue);
|
---|
840 | free(astring2);
|
---|
841 | }
|
---|
842 | }
|
---|
843 | FreeAsciiString(astring1);
|
---|
844 | return(rc);
|
---|
845 | }
|
---|
846 |
|
---|
847 |
|
---|
848 | /*****************************************************************************
|
---|
849 | * Name :
|
---|
850 | * Purpose :
|
---|
851 | * Parameters:
|
---|
852 | * Variables :
|
---|
853 | * Result :
|
---|
854 | * Remark :
|
---|
855 | * Status : UNTESTED STUB
|
---|
856 | *
|
---|
857 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
858 | *****************************************************************************/
|
---|
859 |
|
---|
860 | LONG WIN32API RegQueryValueExA(HKEY hkey,
|
---|
861 | LPSTR lpszValueName,
|
---|
862 | LPDWORD lpdwReserved,
|
---|
863 | LPDWORD lpdwType,
|
---|
864 | LPBYTE lpbData,
|
---|
865 | LPDWORD lpcbData)
|
---|
866 | {
|
---|
867 | dprintf(("ADVAPI32:Registry key=%s", lpszValueName));
|
---|
868 |
|
---|
869 | return O32_RegQueryValueEx(ConvertKey(hkey),
|
---|
870 | lpszValueName,
|
---|
871 | lpdwReserved,
|
---|
872 | lpdwType,
|
---|
873 | lpbData,
|
---|
874 | lpcbData);
|
---|
875 | }
|
---|
876 |
|
---|
877 |
|
---|
878 | /*****************************************************************************
|
---|
879 | * Name :
|
---|
880 | * Purpose :
|
---|
881 | * Parameters:
|
---|
882 | * Variables :
|
---|
883 | * Result :
|
---|
884 | * Remark : TODO: DOESN'T WORK FOR STRING DATA!!
|
---|
885 | * Status : UNTESTED STUB
|
---|
886 | *
|
---|
887 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
888 | *****************************************************************************/
|
---|
889 |
|
---|
890 | LONG WIN32API RegQueryValueExW(HKEY hkey,
|
---|
891 | LPWSTR lpszValueName,
|
---|
892 | LPDWORD lpdwReserved,
|
---|
893 | LPDWORD lpdwType,
|
---|
894 | LPBYTE lpbData,
|
---|
895 | LPDWORD lpcbData)
|
---|
896 | {
|
---|
897 | char *astring = UnicodeToAsciiString(lpszValueName);
|
---|
898 | char *akeydata = NULL;
|
---|
899 | LONG rc;
|
---|
900 | DWORD dwType;
|
---|
901 |
|
---|
902 | if(lpbData && lpcbData)
|
---|
903 | {
|
---|
904 | akeydata = (char *)malloc(*lpcbData+1);
|
---|
905 | akeydata[*lpcbData] = 0;
|
---|
906 | }
|
---|
907 |
|
---|
908 | if(lpdwType == NULL) {
|
---|
909 | lpdwType = &dwType;
|
---|
910 | }
|
---|
911 |
|
---|
912 | rc = RegQueryValueExA(hkey, astring, lpdwReserved, lpdwType,
|
---|
913 | (LPBYTE)akeydata, lpcbData);
|
---|
914 | //could also query key type (without returning data), call it again and only allocate translation
|
---|
915 | //buffer if string type
|
---|
916 | if(rc == ERROR_SUCCESS && lpbData && lpcbData)
|
---|
917 | {
|
---|
918 | switch(*lpdwType) {
|
---|
919 | case REG_SZ:
|
---|
920 | case REG_EXPAND_SZ:
|
---|
921 | lstrcpyAtoW((LPWSTR)lpbData, akeydata);
|
---|
922 | break;
|
---|
923 | case REG_MULTI_SZ:
|
---|
924 | case REG_LINK: //???
|
---|
925 | dprintf(("ERROR: key data must be translated from Unicode to Ascii!!"));
|
---|
926 | break;
|
---|
927 | default:
|
---|
928 | memcpy(lpbData, akeydata, *lpcbData);
|
---|
929 | break;
|
---|
930 | }
|
---|
931 | }
|
---|
932 | FreeAsciiString(astring);
|
---|
933 | if(akeydata) {
|
---|
934 | free(akeydata);
|
---|
935 | }
|
---|
936 | return(rc);
|
---|
937 | }
|
---|
938 |
|
---|
939 |
|
---|
940 | /*****************************************************************************
|
---|
941 | * Name :
|
---|
942 | * Purpose :
|
---|
943 | * Parameters:
|
---|
944 | * Variables :
|
---|
945 | * Result :
|
---|
946 | * Remark :
|
---|
947 | * Status : UNTESTED STUB
|
---|
948 | *
|
---|
949 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
950 | *****************************************************************************/
|
---|
951 |
|
---|
952 | LONG WIN32API RegSetValueA(HKEY hkey,
|
---|
953 | LPCSTR lpSubKey,
|
---|
954 | DWORD dwType,
|
---|
955 | LPCSTR lpData,
|
---|
956 | DWORD cbData)
|
---|
957 | {
|
---|
958 | LONG rc;
|
---|
959 |
|
---|
960 | //SvL: 8-11-'97: Bugfix: crash in pmwinx if size == 0 and string is large
|
---|
961 | if(cbData == 0)
|
---|
962 | cbData = strlen(lpData);
|
---|
963 |
|
---|
964 | rc = O32_RegSetValue(ConvertKey(hkey), lpSubKey,
|
---|
965 | dwType, lpData, cbData);
|
---|
966 |
|
---|
967 | if(rc == ERROR_NOT_ENOUGH_MEMORY && cbData == 0 && dwType == REG_SZ)
|
---|
968 | {
|
---|
969 | char regdata = 0;
|
---|
970 | //SvL: Netscape sets an empty string key this way; Open32 doesn't like it
|
---|
971 | rc = O32_RegSetValue(ConvertKey(hkey),
|
---|
972 | lpSubKey,
|
---|
973 | dwType,
|
---|
974 | ®data,
|
---|
975 | 1);
|
---|
976 | }
|
---|
977 | return rc;
|
---|
978 | }
|
---|
979 |
|
---|
980 |
|
---|
981 | /*****************************************************************************
|
---|
982 | * Name :
|
---|
983 | * Purpose :
|
---|
984 | * Parameters:
|
---|
985 | * Variables :
|
---|
986 | * Result :
|
---|
987 | * Remark :
|
---|
988 | * Status : UNTESTED STUB
|
---|
989 | *
|
---|
990 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
991 | *****************************************************************************/
|
---|
992 |
|
---|
993 | LONG WIN32API RegSetValueW(HKEY hkey,
|
---|
994 | LPCWSTR lpSubKey,
|
---|
995 | DWORD dwType,
|
---|
996 | LPCWSTR lpData,
|
---|
997 | DWORD cbData)
|
---|
998 | {
|
---|
999 | char *astring1 = UnicodeToAsciiString((LPWSTR)lpSubKey);
|
---|
1000 | char *astring2 = UnicodeToAsciiString((LPWSTR)lpData);
|
---|
1001 | LONG rc;
|
---|
1002 |
|
---|
1003 | rc = RegSetValueA(hkey, astring1, dwType, astring2, cbData);
|
---|
1004 |
|
---|
1005 | FreeAsciiString(astring1);
|
---|
1006 | FreeAsciiString(astring2);
|
---|
1007 | return(rc);
|
---|
1008 | }
|
---|
1009 |
|
---|
1010 |
|
---|
1011 | /*****************************************************************************
|
---|
1012 | * Name :
|
---|
1013 | * Purpose :
|
---|
1014 | * Parameters:
|
---|
1015 | * Variables :
|
---|
1016 | * Result :
|
---|
1017 | * Remark : TODO:Check for string length here too?
|
---|
1018 | * Status : UNTESTED STUB
|
---|
1019 | *
|
---|
1020 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1021 | *****************************************************************************/
|
---|
1022 |
|
---|
1023 | LONG WIN32API RegSetValueExA(HKEY hkey,
|
---|
1024 | LPCSTR lpszValueName,
|
---|
1025 | DWORD dwReserved,
|
---|
1026 | DWORD fdwType,
|
---|
1027 | BYTE* lpbData,
|
---|
1028 | DWORD cbData)
|
---|
1029 | {
|
---|
1030 | if(fdwType == REG_SZ) {
|
---|
1031 | dprintf(("ADVAPI32: RegSetValueExA)%08xh,%s,%08xh,%08xh,%s,%08xh)",
|
---|
1032 | hkey,
|
---|
1033 | lpszValueName,
|
---|
1034 | dwReserved,
|
---|
1035 | fdwType,
|
---|
1036 | lpbData,
|
---|
1037 | cbData));
|
---|
1038 | }
|
---|
1039 | else {
|
---|
1040 | dprintf(("ADVAPI32: RegSetValueExA)%08xh,%s,%08xh,%08xh,%08xh,%08xh)",
|
---|
1041 | hkey,
|
---|
1042 | lpszValueName,
|
---|
1043 | dwReserved,
|
---|
1044 | fdwType,
|
---|
1045 | lpbData,
|
---|
1046 | cbData));
|
---|
1047 | }
|
---|
1048 |
|
---|
1049 | return O32_RegSetValueEx(ConvertKey(hkey),
|
---|
1050 | lpszValueName,
|
---|
1051 | dwReserved,
|
---|
1052 | fdwType,
|
---|
1053 | lpbData,
|
---|
1054 | cbData);
|
---|
1055 | }
|
---|
1056 |
|
---|
1057 |
|
---|
1058 | /*****************************************************************************
|
---|
1059 | * Name :
|
---|
1060 | * Purpose :
|
---|
1061 | * Parameters:
|
---|
1062 | * Variables :
|
---|
1063 | * Result :
|
---|
1064 | * Remark : TODO:Check for string length here too?
|
---|
1065 | * Status : UNTESTED STUB
|
---|
1066 | *
|
---|
1067 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1068 | *****************************************************************************/
|
---|
1069 |
|
---|
1070 | LONG WIN32API RegSetValueExW(HKEY hkey,
|
---|
1071 | LPCWSTR lpszValueName,
|
---|
1072 | DWORD dwReserved,
|
---|
1073 | DWORD fdwType,
|
---|
1074 | BYTE* lpbData,
|
---|
1075 | DWORD cbData)
|
---|
1076 | {
|
---|
1077 | char *astring = UnicodeToAsciiString(lpszValueName);
|
---|
1078 | char *akeydata = NULL;
|
---|
1079 | LONG rc;
|
---|
1080 |
|
---|
1081 | switch(fdwType) {
|
---|
1082 | case REG_SZ:
|
---|
1083 | case REG_EXPAND_SZ:
|
---|
1084 | akeydata = UnicodeToAsciiString((LPWSTR)lpbData);
|
---|
1085 | lpbData = (BYTE *)akeydata;
|
---|
1086 | break;
|
---|
1087 | case REG_MULTI_SZ:
|
---|
1088 | case REG_LINK: //???
|
---|
1089 | dprintf(("ERROR: key data must be translated from Unicode to Ascii!!"));
|
---|
1090 | break;
|
---|
1091 | }
|
---|
1092 | rc = RegSetValueExA(hkey, astring, dwReserved, fdwType, lpbData, cbData);
|
---|
1093 | if(akeydata)
|
---|
1094 | FreeAsciiString(akeydata);
|
---|
1095 |
|
---|
1096 | FreeAsciiString(astring);
|
---|
1097 | return(rc);
|
---|
1098 | }
|
---|
1099 |
|
---|
1100 |
|
---|
1101 | /*****************************************************************************
|
---|
1102 | * Name :
|
---|
1103 | * Purpose :
|
---|
1104 | * Parameters:
|
---|
1105 | * Variables :
|
---|
1106 | * Result :
|
---|
1107 | * Remark :
|
---|
1108 | * Status : UNTESTED STUB
|
---|
1109 | *
|
---|
1110 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1111 | *****************************************************************************/
|
---|
1112 |
|
---|
1113 | LONG WIN32API RegFlushKey(HKEY hkey)
|
---|
1114 | {
|
---|
1115 | dprintf(("ADVAPI32: RegFlushKey not implemented yet."));
|
---|
1116 |
|
---|
1117 | return(ERROR_SUCCESS);
|
---|
1118 | }
|
---|
1119 |
|
---|
1120 |
|
---|
1121 | /*****************************************************************************
|
---|
1122 | * Name : RegConnectRegistryA
|
---|
1123 | * Purpose : The RegConnectRegistry function establishes a connection to a
|
---|
1124 | * predefined registry handle on another computer.
|
---|
1125 | * Parameters: LPTSTR lpszComputerName address of name of remote computer
|
---|
1126 | * HKEY hKey predefined registry handle
|
---|
1127 | * PHKEY phkResult address of buffer for remote registry handle
|
---|
1128 | * Variables :
|
---|
1129 | * Result :
|
---|
1130 | * Remark :
|
---|
1131 | * Status : UNTESTED STUB
|
---|
1132 | *
|
---|
1133 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1134 | *****************************************************************************/
|
---|
1135 |
|
---|
1136 | LONG WIN32API RegConnectRegistryA(LPCSTR lpszComputerName,
|
---|
1137 | HKEY hKey,
|
---|
1138 | PHKEY phkResult)
|
---|
1139 | {
|
---|
1140 | char szLocalName[256];
|
---|
1141 | DWORD dwNameLength = sizeof(szLocalName)-2;
|
---|
1142 |
|
---|
1143 | szLocalName[0] = '\\';
|
---|
1144 | szLocalName[1] = '\\';
|
---|
1145 | GetComputerNameA(szLocalName+2, &dwNameLength);
|
---|
1146 |
|
---|
1147 | dprintf(("ADVAPI32: RegConnectRegistryA(%s,local %s) not implemented yet.\n",
|
---|
1148 | lpszComputerName,
|
---|
1149 | szLocalName));
|
---|
1150 |
|
---|
1151 | /* local registry ? */
|
---|
1152 | if ( ( lpszComputerName == NULL) ||
|
---|
1153 | (strcmp(szLocalName, lpszComputerName) == 0 ) )
|
---|
1154 | {
|
---|
1155 | /* @@@PH experimental !!! */
|
---|
1156 | *phkResult = hKey;
|
---|
1157 |
|
---|
1158 | return (NO_ERROR);
|
---|
1159 | }
|
---|
1160 |
|
---|
1161 | return (ERROR_ACCESS_DENIED);
|
---|
1162 | }
|
---|
1163 |
|
---|
1164 |
|
---|
1165 | /*****************************************************************************
|
---|
1166 | * Name : RegConnectRegistryW
|
---|
1167 | * Purpose : The RegConnectRegistry function establishes a connection to a
|
---|
1168 | * predefined registry handle on another computer.
|
---|
1169 | * Parameters: LPWSTR lpszComputerName address of name of remote computer
|
---|
1170 | * HKEY hKey predefined registry handle
|
---|
1171 | * PHKEY phkResult address of buffer for remote registry handle
|
---|
1172 | * Variables :
|
---|
1173 | * Result :
|
---|
1174 | * Remark :
|
---|
1175 | * Status : UNTESTED STUB
|
---|
1176 | *
|
---|
1177 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1178 | *****************************************************************************/
|
---|
1179 |
|
---|
1180 | LONG WIN32API RegConnectRegistryW(LPCWSTR lpszComputerName,
|
---|
1181 | HKEY hKey,
|
---|
1182 | PHKEY phkResult)
|
---|
1183 | {
|
---|
1184 | /* corresponding ascii string */
|
---|
1185 | LPSTR pszAscii;
|
---|
1186 | LONG rc; /* returncode from call to ascii version of this function */
|
---|
1187 |
|
---|
1188 | dprintf(("ADVAPI32: RegConnectRegistryW not implemented yet."));
|
---|
1189 |
|
---|
1190 | if (lpszComputerName != NULL)
|
---|
1191 | pszAscii = UnicodeToAsciiString((LPWSTR)lpszComputerName);
|
---|
1192 | else
|
---|
1193 | pszAscii = NULL;
|
---|
1194 |
|
---|
1195 | rc = RegConnectRegistryA(pszAscii,
|
---|
1196 | hKey,
|
---|
1197 | phkResult);
|
---|
1198 |
|
---|
1199 | if (pszAscii != NULL)
|
---|
1200 | FreeAsciiString(pszAscii);
|
---|
1201 |
|
---|
1202 | return (rc); /* OK */
|
---|
1203 | }
|
---|
1204 |
|
---|
1205 |
|
---|
1206 | /*****************************************************************************
|
---|
1207 | * Name : RegGetKeySecurity
|
---|
1208 | * Purpose : The RegGetKeySecurity function retrieves a copy of the security
|
---|
1209 | * descriptor protecting the specified open registry key.
|
---|
1210 | * Parameters: HKEY hKey open handle of key to set
|
---|
1211 | * SECURITY_INFORMATION SecInf descriptor contents
|
---|
1212 | * PSECURITY_DESCRIPTOR pSecDesc address of descriptor for key
|
---|
1213 | * LPDWORD lpcbSecDesc address of size of buffer and descriptor
|
---|
1214 | * Variables :
|
---|
1215 | * Result :
|
---|
1216 | * Remark :
|
---|
1217 | * Status : UNTESTED STUB
|
---|
1218 | *
|
---|
1219 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1220 | *****************************************************************************/
|
---|
1221 |
|
---|
1222 | LONG WIN32API RegGetKeySecurity(HKEY hKey,
|
---|
1223 | SECURITY_INFORMATION SecInf,
|
---|
1224 | PSECURITY_DESCRIPTOR pSecDesc,
|
---|
1225 | LPDWORD lpcbSecDesc)
|
---|
1226 | {
|
---|
1227 | dprintf(("ADVAPI32: RegGetKeySecurity not implemented.\n"));
|
---|
1228 |
|
---|
1229 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1230 | }
|
---|
1231 |
|
---|
1232 |
|
---|
1233 | /*****************************************************************************
|
---|
1234 | * Name : RegLoadKeyA
|
---|
1235 | * Purpose : The RegLoadKey function creates a subkey under HKEY_USER or
|
---|
1236 | * HKEY_LOCAL_MACHINE and stores registration information from a
|
---|
1237 | * specified file into that subkey. This registration information
|
---|
1238 | * is in the form of a hive. A hive is a discrete body of keys,
|
---|
1239 | * subkeys, and values that is rooted at the top of the registry
|
---|
1240 | * hierarchy. A hive is backed by a single file and .LOG file.
|
---|
1241 | * Parameters: HKEY hKey handle of open key
|
---|
1242 | * LPCSTR lpszSubKey address of name of subkey
|
---|
1243 | * LPCSTR lpszFile address of filename for registry information
|
---|
1244 | * Variables :
|
---|
1245 | * Result :
|
---|
1246 | * Remark :
|
---|
1247 | * Status : UNTESTED STUB
|
---|
1248 | *
|
---|
1249 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1250 | *****************************************************************************/
|
---|
1251 |
|
---|
1252 | LONG WIN32API RegLoadKeyA(HKEY hKey,
|
---|
1253 | LPCSTR lpszSubKey,
|
---|
1254 | LPCSTR lpszFile)
|
---|
1255 | {
|
---|
1256 | dprintf(("ADVAPI32: RegLoadKeyA not implemented.\n"));
|
---|
1257 |
|
---|
1258 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1259 | }
|
---|
1260 |
|
---|
1261 |
|
---|
1262 | /*****************************************************************************
|
---|
1263 | * Name : RegLoadKeyW
|
---|
1264 | * Purpose : The RegLoadKey function creates a subkey under HKEY_USER or
|
---|
1265 | * HKEY_LOCAL_MACHINE and stores registration information from a
|
---|
1266 | * specified file into that subkey. This registration information
|
---|
1267 | * is in the form of a hive. A hive is a discrete body of keys,
|
---|
1268 | * subkeys, and values that is rooted at the top of the registry
|
---|
1269 | * hierarchy. A hive is backed by a single file and .LOG file.
|
---|
1270 | * Parameters: HKEY hKey handle of open key
|
---|
1271 | * LPCWSTR lpszSubKey address of name of subkey
|
---|
1272 | * LPCWSTR lpszFile address of filename for registry information
|
---|
1273 | * Variables :
|
---|
1274 | * Result :
|
---|
1275 | * Remark :
|
---|
1276 | * Status : UNTESTED STUB
|
---|
1277 | *
|
---|
1278 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1279 | *****************************************************************************/
|
---|
1280 |
|
---|
1281 | LONG WIN32API RegLoadKeyW(HKEY hKey,
|
---|
1282 | LPCWSTR lpszSubKey,
|
---|
1283 | LPCWSTR lpszFile)
|
---|
1284 | {
|
---|
1285 | dprintf(("ADVAPI32: RegLoadKeyW not implemented.\n"));
|
---|
1286 |
|
---|
1287 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1288 | }
|
---|
1289 |
|
---|
1290 |
|
---|
1291 | /*****************************************************************************
|
---|
1292 | * Name : RegQueryMultipleValuesA
|
---|
1293 | * Purpose : The RegQueryMultipleValues function retrieves the type and data
|
---|
1294 | * for a list of value names associated with an open registry key.
|
---|
1295 | * Parameters: HKEY hKey handle of key to query
|
---|
1296 | * PVALENT val_list address of array of value entry structures
|
---|
1297 | * DWORD num_vals size of array of value entry structures
|
---|
1298 | * LPTSTR lpValueBuf address of buffer for value information
|
---|
1299 | * LPDWORD ldwTotsize address of size of value buffer
|
---|
1300 | * Variables :
|
---|
1301 | * Result :
|
---|
1302 | * Remark :
|
---|
1303 | * Status : UNTESTED STUB
|
---|
1304 | *
|
---|
1305 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1306 | *****************************************************************************/
|
---|
1307 |
|
---|
1308 | LONG WIN32API RegQueryMultipleValuesA(HKEY hKey,
|
---|
1309 | PVALENTA val_list,
|
---|
1310 | DWORD num_vals,
|
---|
1311 | LPTSTR lpValueBuf,
|
---|
1312 | LPDWORD ldwTotsize)
|
---|
1313 | {
|
---|
1314 | dprintf(("ADVAPI32: RegQueryMultipleValuesA not implemented.\n"));
|
---|
1315 |
|
---|
1316 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1317 | }
|
---|
1318 |
|
---|
1319 |
|
---|
1320 | /*****************************************************************************
|
---|
1321 | * Name : RegQueryMultipleValuesW
|
---|
1322 | * Purpose : The RegQueryMultipleValues function retrieves the type and data
|
---|
1323 | * for a list of value names associated with an open registry key.
|
---|
1324 | * Parameters: HKEY hKey handle of key to query
|
---|
1325 | * PVALENT val_list address of array of value entry structures
|
---|
1326 | * DWORD num_vals size of array of value entry structures
|
---|
1327 | * LPWSTR lpValueBuf address of buffer for value information
|
---|
1328 | * LPDWORD ldwTotsize address of size of value buffer
|
---|
1329 | * Variables :
|
---|
1330 | * Result :
|
---|
1331 | * Remark :
|
---|
1332 | * Status : UNTESTED STUB
|
---|
1333 | *
|
---|
1334 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1335 | *****************************************************************************/
|
---|
1336 |
|
---|
1337 | LONG WIN32API RegQueryMultipleValuesW(HKEY hKey,
|
---|
1338 | PVALENTW val_list,
|
---|
1339 | DWORD num_vals,
|
---|
1340 | LPWSTR lpValueBuf,
|
---|
1341 | LPDWORD ldwTotsize)
|
---|
1342 | {
|
---|
1343 | dprintf(("ADVAPI32: RegQueryMultipleValuesW not implemented.\n"));
|
---|
1344 |
|
---|
1345 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1346 | }
|
---|
1347 |
|
---|
1348 |
|
---|
1349 | /*****************************************************************************
|
---|
1350 | * Name : RegRemapPreDefKey
|
---|
1351 | * Purpose :
|
---|
1352 | * Parameters:
|
---|
1353 | * Variables :
|
---|
1354 | * Result :
|
---|
1355 | * Remark :
|
---|
1356 | * Status : UNTESTED STUB
|
---|
1357 | *
|
---|
1358 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1359 | *****************************************************************************/
|
---|
1360 |
|
---|
1361 | #if 0
|
---|
1362 | LONG WIN32API RegRemapPreDefKey(HKEY hKey)
|
---|
1363 | {
|
---|
1364 | dprintf(("ADVAPI32: RegRemapPreDefKey not implemented.\n"));
|
---|
1365 |
|
---|
1366 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1367 | }
|
---|
1368 | #endif
|
---|
1369 |
|
---|
1370 |
|
---|
1371 | /*****************************************************************************
|
---|
1372 | * Name : RegReplaceKeyA
|
---|
1373 | * Purpose : The RegReplaceKey function replaces the file backing a key and
|
---|
1374 | * all its subkeys with another file, so that when the system is
|
---|
1375 | * next started, the key and subkeys will have the values stored in the new file.
|
---|
1376 | * Parameters: HKEY hKey handle of open key
|
---|
1377 | * LPCSTR lpSubKey address of name of subkey
|
---|
1378 | * LPCSTR lpNewFile address of filename for file with new data
|
---|
1379 | * LPCSTR lpOldFile address of filename for backup file
|
---|
1380 | * Variables :
|
---|
1381 | * Result :
|
---|
1382 | * Remark :
|
---|
1383 | * Status : UNTESTED STUB
|
---|
1384 | *
|
---|
1385 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1386 | *****************************************************************************/
|
---|
1387 |
|
---|
1388 | LONG WIN32API RegReplaceKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpNewFile,
|
---|
1389 | LPCSTR lpOldFile)
|
---|
1390 | {
|
---|
1391 | dprintf(("ADVAPI32: RegReplaceKeyA not implemented.\n"));
|
---|
1392 |
|
---|
1393 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1394 | }
|
---|
1395 |
|
---|
1396 |
|
---|
1397 | /*****************************************************************************
|
---|
1398 | * Name : RegReplaceKeyW
|
---|
1399 | * Purpose : The RegReplaceKey function replaces the file backing a key and
|
---|
1400 | * all its subkeys with another file, so that when the system is
|
---|
1401 | * next started, the key and subkeys will have the values stored in the new file.
|
---|
1402 | * Parameters: HKEY hKey handle of open key
|
---|
1403 | * LPCWSTR lpSubKey address of name of subkey
|
---|
1404 | * LPCWSTR lpNewFile address of filename for file with new data
|
---|
1405 | * LPCWSTR lpOldFile address of filename for backup file
|
---|
1406 | * Variables :
|
---|
1407 | * Result :
|
---|
1408 | * Remark :
|
---|
1409 | * Status : UNTESTED STUB
|
---|
1410 | *
|
---|
1411 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1412 | *****************************************************************************/
|
---|
1413 |
|
---|
1414 | LONG WIN32API RegReplaceKeyW(HKEY hKey,
|
---|
1415 | LPCWSTR lpSubKey,
|
---|
1416 | LPCWSTR lpNewFile,
|
---|
1417 | LPCWSTR lpOldFile)
|
---|
1418 | {
|
---|
1419 | dprintf(("ADVAPI32: RegReplaceKeyW not implemented.\n"));
|
---|
1420 |
|
---|
1421 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1422 | }
|
---|
1423 |
|
---|
1424 |
|
---|
1425 | /*****************************************************************************
|
---|
1426 | * Name : RegRestoreKeyA
|
---|
1427 | * Purpose : The RegRestoreKey function reads the registry information in a
|
---|
1428 | * specified file and copies it over the specified key. This
|
---|
1429 | * registry information may be in the form of a key and multiple
|
---|
1430 | * levels of subkeys.
|
---|
1431 | * Parameters: HKEY hKey handle of key where restore begins
|
---|
1432 | * LPCSTR lpszFile address of filename containing saved tree
|
---|
1433 | * DWORD fdw optional flags
|
---|
1434 | * Variables :
|
---|
1435 | * Result :
|
---|
1436 | * Remark :
|
---|
1437 | * Status : UNTESTED STUB
|
---|
1438 | *
|
---|
1439 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1440 | *****************************************************************************/
|
---|
1441 |
|
---|
1442 | LONG WIN32API RegRestoreKeyA(HKEY hKey,
|
---|
1443 | LPCSTR lpszFile,
|
---|
1444 | DWORD fdw)
|
---|
1445 | {
|
---|
1446 | dprintf(("ADVAPI32: RegRestoreKeyA not implemented.\n"));
|
---|
1447 |
|
---|
1448 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1449 | }
|
---|
1450 |
|
---|
1451 |
|
---|
1452 | /*****************************************************************************
|
---|
1453 | * Name : RegRestoreKeyW
|
---|
1454 | * Purpose : The RegRestoreKey function reads the registry information in a
|
---|
1455 | * specified file and copies it over the specified key. This
|
---|
1456 | * registry information may be in the form of a key and multiple
|
---|
1457 | * levels of subkeys.
|
---|
1458 | * Parameters: HKEY hKey handle of key where restore begins
|
---|
1459 | * LPCWSTR lpszFile address of filename containing saved tree
|
---|
1460 | * DWORD fdw optional flags
|
---|
1461 | * Variables :
|
---|
1462 | * Result :
|
---|
1463 | * Remark :
|
---|
1464 | * Status : UNTESTED STUB
|
---|
1465 | *
|
---|
1466 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1467 | *****************************************************************************/
|
---|
1468 |
|
---|
1469 | LONG WIN32API RegRestoreKeyW(HKEY hKey,
|
---|
1470 | LPCWSTR lpszFile,
|
---|
1471 | DWORD fdw)
|
---|
1472 | {
|
---|
1473 | dprintf(("ADVAPI32: RegRestoreKeyW not implemented.\n"));
|
---|
1474 |
|
---|
1475 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1476 | }
|
---|
1477 |
|
---|
1478 |
|
---|
1479 | /*****************************************************************************
|
---|
1480 | * Name : RegSaveKeyA
|
---|
1481 | * Purpose : The RegSaveKey function saves the specified key and all of its
|
---|
1482 | * subkeys and values to a new file.
|
---|
1483 | * Parameters: HKEY hKey handle of key where save begins
|
---|
1484 | * LPCSTR lpszFile address of filename to save to
|
---|
1485 | * LPSECURITY_ATTRIBUTES lpsa address of security structure
|
---|
1486 | * Variables :
|
---|
1487 | * Result :
|
---|
1488 | * Remark :
|
---|
1489 | * Status : UNTESTED STUB
|
---|
1490 | *
|
---|
1491 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1492 | *****************************************************************************/
|
---|
1493 |
|
---|
1494 | LONG WIN32API RegSaveKeyA(HKEY hKey,
|
---|
1495 | LPCSTR lpszFile,
|
---|
1496 | LPSECURITY_ATTRIBUTES lpsa)
|
---|
1497 | {
|
---|
1498 | dprintf(("ADVAPI32: RegSaveKeyA not implemented.\n"));
|
---|
1499 |
|
---|
1500 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1501 | }
|
---|
1502 |
|
---|
1503 |
|
---|
1504 | /*****************************************************************************
|
---|
1505 | * Name : RegSaveKeyW
|
---|
1506 | * Purpose : The RegSaveKey function saves the specified key and all of its
|
---|
1507 | * subkeys and values to a new file.
|
---|
1508 | * Parameters: HKEY hKey handle of key where save begins
|
---|
1509 | * LPCWSTR lpszFile address of filename to save to
|
---|
1510 | * LPSECURITY_ATTRIBUTES lpsa address of security structure
|
---|
1511 | * Variables :
|
---|
1512 | * Result :
|
---|
1513 | * Remark :
|
---|
1514 | * Status : UNTESTED STUB
|
---|
1515 | *
|
---|
1516 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1517 | *****************************************************************************/
|
---|
1518 |
|
---|
1519 | LONG WIN32API RegSaveKeyW(HKEY hKey,
|
---|
1520 | LPCWSTR lpszFile,
|
---|
1521 | LPSECURITY_ATTRIBUTES lpsa)
|
---|
1522 | {
|
---|
1523 | dprintf(("ADVAPI32: RegSaveKeyW not implemented.\n"));
|
---|
1524 |
|
---|
1525 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1526 | }
|
---|
1527 |
|
---|
1528 |
|
---|
1529 | /*****************************************************************************
|
---|
1530 | * Name : RegSetKeySecurity
|
---|
1531 | * Purpose : The RegSetKeySecurity function sets the security of an open registry key.
|
---|
1532 | * Parameters: HKEY hKey open handle of key to set
|
---|
1533 | * SECURITY_INFORMATION si descriptor contents
|
---|
1534 | * PSECURITY_DESCRIPTOR psd address of descriptor for key
|
---|
1535 | * Variables :
|
---|
1536 | * Result :
|
---|
1537 | * Remark :
|
---|
1538 | * Status : UNTESTED STUB
|
---|
1539 | *
|
---|
1540 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1541 | *****************************************************************************/
|
---|
1542 |
|
---|
1543 | LONG WIN32API RegSetKeySecurity(HKEY hKey,
|
---|
1544 | SECURITY_INFORMATION si,
|
---|
1545 | PSECURITY_DESCRIPTOR psd)
|
---|
1546 | {
|
---|
1547 | dprintf(("ADVAPI32: RegSetKeySecurity not implemented.\n"));
|
---|
1548 |
|
---|
1549 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1550 | }
|
---|
1551 |
|
---|
1552 |
|
---|
1553 | /*****************************************************************************
|
---|
1554 | * Name : RegUnLoadKeyA
|
---|
1555 | * Purpose : The RegUnLoadKey function unloads the specified key and subkeys from the registry.
|
---|
1556 | * Parameters: HKEY hKey handle of open key
|
---|
1557 | * LPCSTR lpszSubKey address of name of subkey to unload
|
---|
1558 | * Variables :
|
---|
1559 | * Result :
|
---|
1560 | * Remark :
|
---|
1561 | * Status : UNTESTED STUB
|
---|
1562 | *
|
---|
1563 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1564 | *****************************************************************************/
|
---|
1565 |
|
---|
1566 | LONG WIN32API RegUnLoadKeyA(HKEY hKey,
|
---|
1567 | LPCSTR lpszSubKey)
|
---|
1568 | {
|
---|
1569 | dprintf(("ADVAPI32: RegUnLoadKeyA not implemented.\n"));
|
---|
1570 |
|
---|
1571 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1572 | }
|
---|
1573 |
|
---|
1574 |
|
---|
1575 | /*****************************************************************************
|
---|
1576 | * Name : RegUnLoadKeyW
|
---|
1577 | * Purpose : The RegUnLoadKey function unloads the specified key and subkeys from the registry.
|
---|
1578 | * Parameters: HKEY hKey handle of open key
|
---|
1579 | * LPCWSTR lpszSubKey address of name of subkey to unload
|
---|
1580 | * Variables :
|
---|
1581 | * Result :
|
---|
1582 | * Remark :
|
---|
1583 | * Status : UNTESTED STUB
|
---|
1584 | *
|
---|
1585 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1586 | *****************************************************************************/
|
---|
1587 |
|
---|
1588 | LONG WIN32API RegUnLoadKeyW(HKEY hKey,
|
---|
1589 | LPCWSTR lpszSubKey)
|
---|
1590 | {
|
---|
1591 | dprintf(("ADVAPI32: RegUnLoadKeyW not implemented.\n"));
|
---|
1592 |
|
---|
1593 | return (ERROR_ACCESS_DENIED); /* signal failure */
|
---|
1594 | }
|
---|
1595 |
|
---|
1596 |
|
---|
1597 | /*****************************************************************************
|
---|
1598 | * Name : RegNotifyChangeKeyValue
|
---|
1599 | * Purpose :
|
---|
1600 | * Parameters: HKEY hKey handle of open key
|
---|
1601 | * LPCWSTR lpszSubKey address of name of subkey to unload
|
---|
1602 | * Variables :
|
---|
1603 | * Result :
|
---|
1604 | * Remark :
|
---|
1605 | * Status : UNTESTED STUB
|
---|
1606 | *
|
---|
1607 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1608 | *****************************************************************************/
|
---|
1609 |
|
---|
1610 | LONG WIN32API RegNotifyChangeKeyValue(HKEY hKey,
|
---|
1611 | BOOL bWatchSubtree,
|
---|
1612 | DWORD dwNotifyFilter,
|
---|
1613 | HANDLE hEvent,
|
---|
1614 | BOOL fAsynchronus)
|
---|
1615 | {
|
---|
1616 | dprintf(("ADVAPI32: RegNotifyChangeKeyValue() not implemented.\n"));
|
---|
1617 |
|
---|
1618 | return ERROR_ACCESS_DENIED;
|
---|
1619 | }
|
---|
1620 |
|
---|