FreeRDP
Loading...
Searching...
No Matches
registry.c
1
20#include <winpr/config.h>
21
22#include <winpr/registry.h>
23
24/*
25 * Windows registry MSDN pages:
26 * Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724880/
27 * Functions: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724875/
28 */
29
30#if !defined(_WIN32) || defined(_UWP)
31
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
35
36#include <winpr/crt.h>
37#include <winpr/assert.h>
38#include <winpr/string.h>
39
40#include "registry_reg.h"
41
42#include "../log.h"
43#define TAG WINPR_TAG("registry")
44
45static Reg* instance = nullptr;
46
47static size_t regsz_length(const char* key, const void* value)
48{
49 /* https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-element-size-limits
50 *
51 * while not strictly limited to this size larger values should be stored to a
52 * file.
53 */
54 const size_t limit = 16383;
55 size_t length = strnlen((const char*)value, limit);
56 if (length >= limit)
57 WLog_WARN(TAG, "REG_SZ[%s] truncated to size %" PRIuz, key, length);
58 return length;
59}
60
61static Reg* RegGetInstance(void)
62{
63 if (!instance)
64 instance = reg_open(1);
65
66 return instance;
67}
68
69LONG RegCloseKey(HKEY hKey)
70{
71 WINPR_UNUSED(hKey);
72 return 0;
73}
74
75LONG RegCopyTreeW(WINPR_ATTR_UNUSED HKEY hKeySrc, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
76 WINPR_ATTR_UNUSED HKEY hKeyDest)
77{
78 WLog_ERR(TAG, "TODO: Implement");
79 return -1;
80}
81
82LONG RegCopyTreeA(WINPR_ATTR_UNUSED HKEY hKeySrc, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
83 WINPR_ATTR_UNUSED HKEY hKeyDest)
84{
85 WLog_ERR(TAG, "TODO: Implement");
86 return -1;
87}
88
89LONG RegCreateKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
90 WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPWSTR lpClass,
91 WINPR_ATTR_UNUSED DWORD dwOptions, WINPR_ATTR_UNUSED REGSAM samDesired,
92 WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
93 WINPR_ATTR_UNUSED PHKEY phkResult, WINPR_ATTR_UNUSED LPDWORD lpdwDisposition)
94{
95 WLog_ERR(TAG, "TODO: Implement");
96 return -1;
97}
98
99LONG RegCreateKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
100 WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPSTR lpClass,
101 WINPR_ATTR_UNUSED DWORD dwOptions, WINPR_ATTR_UNUSED REGSAM samDesired,
102 WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
103 WINPR_ATTR_UNUSED PHKEY phkResult, WINPR_ATTR_UNUSED LPDWORD lpdwDisposition)
104{
105 WLog_ERR(TAG, "TODO: Implement");
106 return -1;
107}
108
109LONG RegDeleteKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
110 WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD Reserved)
111{
112 WLog_ERR(TAG, "TODO: Implement");
113 return -1;
114}
115
116LONG RegDeleteKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
117 WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD Reserved)
118{
119 WLog_ERR(TAG, "TODO: Implement");
120 return -1;
121}
122
123LONG RegDeleteTreeW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey)
124{
125 WLog_ERR(TAG, "TODO: Implement");
126 return -1;
127}
128
129LONG RegDeleteTreeA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey)
130{
131 WLog_ERR(TAG, "TODO: Implement");
132 return -1;
133}
134
135LONG RegDeleteValueW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpValueName)
136{
137 WLog_ERR(TAG, "TODO: Implement");
138 return -1;
139}
140
141LONG RegDeleteValueA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpValueName)
142{
143 WLog_ERR(TAG, "TODO: Implement");
144 return -1;
145}
146
147LONG RegDisablePredefinedCacheEx(void)
148{
149 WLog_ERR(TAG, "TODO: Implement");
150 return -1;
151}
152
153LONG RegEnumKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
154 WINPR_ATTR_UNUSED LPWSTR lpName, WINPR_ATTR_UNUSED LPDWORD lpcName,
155 WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPWSTR lpClass,
156 WINPR_ATTR_UNUSED LPDWORD lpcClass,
157 WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
158{
159 WLog_ERR(TAG, "TODO: Implement");
160 return -1;
161}
162
163LONG RegEnumKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
164 WINPR_ATTR_UNUSED LPSTR lpName, WINPR_ATTR_UNUSED LPDWORD lpcName,
165 WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPSTR lpClass,
166 WINPR_ATTR_UNUSED LPDWORD lpcClass,
167 WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
168{
169 WLog_ERR(TAG, "TODO: Implement");
170 return -1;
171}
172
173LONG RegEnumValueW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
174 WINPR_ATTR_UNUSED LPWSTR lpValueName, WINPR_ATTR_UNUSED LPDWORD lpcchValueName,
175 WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPDWORD lpType,
176 WINPR_ATTR_UNUSED LPBYTE lpData, WINPR_ATTR_UNUSED LPDWORD lpcbData)
177{
178 WLog_ERR(TAG, "TODO: Implement");
179 return -1;
180}
181
182LONG RegEnumValueA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
183 WINPR_ATTR_UNUSED LPSTR lpValueName, WINPR_ATTR_UNUSED LPDWORD lpcchValueName,
184 WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPDWORD lpType,
185 WINPR_ATTR_UNUSED LPBYTE lpData, WINPR_ATTR_UNUSED LPDWORD lpcbData)
186{
187 WLog_ERR(TAG, "TODO: Implement");
188 return -1;
189}
190
191LONG RegFlushKey(WINPR_ATTR_UNUSED HKEY hKey)
192{
193 WLog_ERR(TAG, "TODO: Implement");
194 return -1;
195}
196
197LONG RegGetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey,
198 WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation,
199 WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
200 WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor)
201{
202 WLog_ERR(TAG, "TODO: Implement");
203 return -1;
204}
205
206LONG RegGetValueW(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
207 WINPR_ATTR_UNUSED LPCWSTR lpValue, WINPR_ATTR_UNUSED DWORD dwFlags,
208 WINPR_ATTR_UNUSED LPDWORD pdwType, WINPR_ATTR_UNUSED PVOID pvData,
209 WINPR_ATTR_UNUSED LPDWORD pcbData)
210{
211 WLog_ERR(TAG, "TODO: Implement");
212 return -1;
213}
214
215LONG RegGetValueA(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
216 WINPR_ATTR_UNUSED LPCSTR lpValue, WINPR_ATTR_UNUSED DWORD dwFlags,
217 WINPR_ATTR_UNUSED LPDWORD pdwType, WINPR_ATTR_UNUSED PVOID pvData,
218 WINPR_ATTR_UNUSED LPDWORD pcbData)
219{
220 WLog_ERR(TAG, "TODO: Implement");
221 return -1;
222}
223
224LONG RegLoadAppKeyW(WINPR_ATTR_UNUSED LPCWSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult,
225 WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions,
226 WINPR_ATTR_UNUSED DWORD Reserved)
227{
228 WLog_ERR(TAG, "TODO: Implement");
229 return -1;
230}
231
232LONG RegLoadAppKeyA(WINPR_ATTR_UNUSED LPCSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult,
233 WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions,
234 WINPR_ATTR_UNUSED DWORD Reserved)
235{
236 WLog_ERR(TAG, "TODO: Implement");
237 return -1;
238}
239
240LONG RegLoadKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
241 WINPR_ATTR_UNUSED LPCWSTR lpFile)
242{
243 WLog_ERR(TAG, "TODO: Implement");
244 return -1;
245}
246
247LONG RegLoadKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
248 WINPR_ATTR_UNUSED LPCSTR lpFile)
249{
250 WLog_ERR(TAG, "TODO: Implement");
251 return -1;
252}
253
254LONG RegLoadMUIStringW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR pszValue,
255 WINPR_ATTR_UNUSED LPWSTR pszOutBuf, WINPR_ATTR_UNUSED DWORD cbOutBuf,
256 WINPR_ATTR_UNUSED LPDWORD pcbData, WINPR_ATTR_UNUSED DWORD Flags,
257 WINPR_ATTR_UNUSED LPCWSTR pszDirectory)
258{
259 WLog_ERR(TAG, "TODO: Implement");
260 return -1;
261}
262
263LONG RegLoadMUIStringA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR pszValue,
264 WINPR_ATTR_UNUSED LPSTR pszOutBuf, WINPR_ATTR_UNUSED DWORD cbOutBuf,
265 WINPR_ATTR_UNUSED LPDWORD pcbData, WINPR_ATTR_UNUSED DWORD Flags,
266 WINPR_ATTR_UNUSED LPCSTR pszDirectory)
267{
268 WLog_ERR(TAG, "TODO: Implement");
269 return -1;
270}
271
272LONG RegNotifyChangeKeyValue(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED BOOL bWatchSubtree,
273 WINPR_ATTR_UNUSED DWORD dwNotifyFilter,
274 WINPR_ATTR_UNUSED HANDLE hEvent, WINPR_ATTR_UNUSED BOOL fAsynchronous)
275{
276 WLog_ERR(TAG, "TODO: Implement");
277 return -1;
278}
279
280LONG RegOpenCurrentUser(WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED PHKEY phkResult)
281{
282 WLog_ERR(TAG, "TODO: Implement");
283 return -1;
284}
285
286LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
287{
288 LONG rc = 0;
289 char* str = ConvertWCharToUtf8Alloc(lpSubKey, nullptr);
290 if (!str)
291 return ERROR_FILE_NOT_FOUND;
292
293 rc = RegOpenKeyExA(hKey, str, ulOptions, samDesired, phkResult);
294 free(str);
295 return rc;
296}
297
298LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, WINPR_ATTR_UNUSED DWORD ulOptions,
299 WINPR_ATTR_UNUSED REGSAM samDesired, PHKEY phkResult)
300{
301 Reg* reg = RegGetInstance();
302
303 if (!reg)
304 return -1;
305
306 if (hKey != HKEY_LOCAL_MACHINE)
307 {
308 WLog_WARN(TAG, "Registry emulation only supports HKEY_LOCAL_MACHINE");
309 return ERROR_FILE_NOT_FOUND;
310 }
311
312 WINPR_ASSERT(reg->root_key);
313 RegKey* pKey = reg->root_key->subkeys;
314
315 while (pKey != nullptr)
316 {
317 WINPR_ASSERT(lpSubKey);
318
319 if (pKey->subname && (_stricmp(pKey->subname, lpSubKey) == 0))
320 {
321 *phkResult = (HKEY)pKey;
322 return ERROR_SUCCESS;
323 }
324
325 pKey = pKey->next;
326 }
327
328 *phkResult = nullptr;
329
330 return ERROR_FILE_NOT_FOUND;
331}
332
333LONG RegOpenUserClassesRoot(WINPR_ATTR_UNUSED HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwOptions,
334 WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED PHKEY phkResult)
335{
336 WLog_ERR(TAG, "TODO: Implement");
337 return -1;
338}
339
340LONG RegQueryInfoKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPWSTR lpClass,
341 WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved,
342 WINPR_ATTR_UNUSED LPDWORD lpcSubKeys,
343 WINPR_ATTR_UNUSED LPDWORD lpcMaxSubKeyLen,
344 WINPR_ATTR_UNUSED LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcValues,
345 WINPR_ATTR_UNUSED LPDWORD lpcMaxValueNameLen,
346 WINPR_ATTR_UNUSED LPDWORD lpcMaxValueLen,
347 WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor,
348 WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
349{
350 WLog_ERR(TAG, "TODO: Implement");
351 return -1;
352}
353
354LONG RegQueryInfoKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPSTR lpClass,
355 WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved,
356 WINPR_ATTR_UNUSED LPDWORD lpcSubKeys,
357 WINPR_ATTR_UNUSED LPDWORD lpcMaxSubKeyLen,
358 WINPR_ATTR_UNUSED LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcValues,
359 WINPR_ATTR_UNUSED LPDWORD lpcMaxValueNameLen,
360 WINPR_ATTR_UNUSED LPDWORD lpcMaxValueLen,
361 WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor,
362 WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
363{
364 WLog_ERR(TAG, "TODO: Implement");
365 return -1;
366}
367
368static LONG reg_read_int(const RegVal* pValue, LPBYTE lpData, LPDWORD lpcbData)
369{
370 const BYTE* ptr = nullptr;
371 DWORD required = 0;
372
373 WINPR_ASSERT(pValue);
374
375 switch (pValue->type)
376 {
377 case REG_DWORD:
378 case REG_DWORD_BIG_ENDIAN:
379 required = sizeof(DWORD);
380 ptr = (const BYTE*)&pValue->data.dword;
381 break;
382 case REG_QWORD:
383 required = sizeof(UINT64);
384 ptr = (const BYTE*)&pValue->data.qword;
385 break;
386 default:
387 return ERROR_INTERNAL_ERROR;
388 }
389
390 if (lpcbData)
391 {
392 DWORD size = *lpcbData;
393 *lpcbData = required;
394 if (lpData)
395 {
396 if (size < *lpcbData)
397 return ERROR_MORE_DATA;
398 }
399 }
400
401 if (lpData != nullptr)
402 {
403 DWORD size = 0;
404 WINPR_ASSERT(lpcbData);
405
406 size = *lpcbData;
407 *lpcbData = required;
408 if (size < required)
409 return ERROR_MORE_DATA;
410 memcpy(lpData, ptr, required);
411 }
412 else if (lpcbData != nullptr)
413 *lpcbData = required;
414 return ERROR_SUCCESS;
415}
416
417// NOLINTBEGIN(readability-non-const-parameter)
418LONG RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType,
419 LPBYTE lpData, LPDWORD lpcbData)
420// NOLINTEND(readability-non-const-parameter)
421{
422 LONG status = ERROR_FILE_NOT_FOUND;
423 RegKey* key = nullptr;
424 RegVal* pValue = nullptr;
425 char* valueName = nullptr;
426
427 WINPR_UNUSED(lpReserved);
428
429 key = (RegKey*)hKey;
430 WINPR_ASSERT(key);
431
432 valueName = ConvertWCharToUtf8Alloc(lpValueName, nullptr);
433 if (!valueName)
434 goto end;
435
436 pValue = key->values;
437
438 while (pValue != nullptr)
439 {
440 if (strcmp(pValue->name, valueName) == 0)
441 {
442 if (lpType)
443 *lpType = pValue->type;
444
445 switch (pValue->type)
446 {
447 case REG_DWORD_BIG_ENDIAN:
448 case REG_QWORD:
449 case REG_DWORD:
450 status = reg_read_int(pValue, lpData, lpcbData);
451 goto end;
452 case REG_SZ:
453 {
454 const size_t length =
455 regsz_length(pValue->name, pValue->data.string) * sizeof(WCHAR);
456
457 status = ERROR_SUCCESS;
458 if (lpData != nullptr)
459 {
460 DWORD size = 0;
461 union
462 {
463 WCHAR* wc;
464 BYTE* b;
465 } cnv;
466 WINPR_ASSERT(lpcbData);
467
468 cnv.b = lpData;
469 size = *lpcbData;
470 *lpcbData = (DWORD)length;
471 if (size < length)
472 status = ERROR_MORE_DATA;
473 if (ConvertUtf8NToWChar(pValue->data.string, length, cnv.wc, length) < 0)
474 status = ERROR_OUTOFMEMORY;
475 }
476 else if (lpcbData)
477 *lpcbData = (UINT32)length;
478
479 goto end;
480 }
481 default:
482 WLog_WARN(TAG,
483 "Registry emulation does not support value type %s [0x%08" PRIx32 "]",
484 reg_type_string(pValue->type), pValue->type);
485 break;
486 }
487 }
488
489 pValue = pValue->next;
490 }
491
492end:
493 free(valueName);
494 return status;
495}
496
497// NOLINTBEGIN(readability-non-const-parameter)
498LONG RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType,
499 LPBYTE lpData, LPDWORD lpcbData)
500// NOLINTEND(readability-non-const-parameter)
501{
502 RegKey* key = nullptr;
503 RegVal* pValue = nullptr;
504
505 WINPR_UNUSED(lpReserved);
506
507 key = (RegKey*)hKey;
508 WINPR_ASSERT(key);
509
510 pValue = key->values;
511
512 while (pValue != nullptr)
513 {
514 if (strcmp(pValue->name, lpValueName) == 0)
515 {
516 if (lpType)
517 *lpType = pValue->type;
518
519 switch (pValue->type)
520 {
521 case REG_DWORD_BIG_ENDIAN:
522 case REG_QWORD:
523 case REG_DWORD:
524 return reg_read_int(pValue, lpData, lpcbData);
525 case REG_SZ:
526 {
527 const size_t length = regsz_length(pValue->name, pValue->data.string);
528
529 char* pData = (char*)lpData;
530
531 if (pData != nullptr)
532 {
533 DWORD size = 0;
534 WINPR_ASSERT(lpcbData);
535
536 size = *lpcbData;
537 *lpcbData = (DWORD)length;
538 if (size < length)
539 return ERROR_MORE_DATA;
540 memcpy(pData, pValue->data.string, length);
541 pData[length] = '\0';
542 }
543 else if (lpcbData)
544 *lpcbData = (UINT32)length;
545
546 return ERROR_SUCCESS;
547 }
548 default:
549 WLog_WARN(TAG,
550 "Registry emulation does not support value type %s [0x%08" PRIx32 "]",
551 reg_type_string(pValue->type), pValue->type);
552 break;
553 }
554 }
555
556 pValue = pValue->next;
557 }
558
559 return ERROR_FILE_NOT_FOUND;
560}
561
562LONG RegRestoreKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpFile,
563 WINPR_ATTR_UNUSED DWORD dwFlags)
564{
565 WLog_ERR(TAG, "TODO: Implement");
566 return -1;
567}
568
569LONG RegRestoreKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpFile,
570 WINPR_ATTR_UNUSED DWORD dwFlags)
571{
572 WLog_ERR(TAG, "TODO: Implement");
573 return -1;
574}
575
576LONG RegSaveKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpFile,
577 WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
578 WINPR_ATTR_UNUSED DWORD Flags)
579{
580 WLog_ERR(TAG, "TODO: Implement");
581 return -1;
582}
583
584LONG RegSaveKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpFile,
585 WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
586 WINPR_ATTR_UNUSED DWORD Flags)
587{
588 WLog_ERR(TAG, "TODO: Implement");
589 return -1;
590}
591
592LONG RegSetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey,
593 WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation,
594 WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor)
595{
596 WLog_ERR(TAG, "TODO: Implement");
597 return -1;
598}
599
600LONG RegSetValueExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpValueName,
601 WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED DWORD dwType,
602 WINPR_ATTR_UNUSED const BYTE* lpData, WINPR_ATTR_UNUSED DWORD cbData)
603{
604 WLog_ERR(TAG, "TODO: Implement");
605 return -1;
606}
607
608LONG RegSetValueExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpValueName,
609 WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED DWORD dwType,
610 WINPR_ATTR_UNUSED const BYTE* lpData, WINPR_ATTR_UNUSED DWORD cbData)
611{
612 WLog_ERR(TAG, "TODO: Implement");
613 return -1;
614}
615
616LONG RegUnLoadKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey)
617{
618 WLog_ERR(TAG, "TODO: Implement");
619 return -1;
620}
621
622LONG RegUnLoadKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey)
623{
624 WLog_ERR(TAG, "TODO: Implement");
625 return -1;
626}
627
628#endif