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