27#define MAX_DEFAULT_HANDLES 6
28#define REG_MAX_NAME_SIZE 256
29#define REG_MAX_DATA_SIZE 2048
44#define ClosePredefKey(Handle) \
45 if ((ULONG_PTR)Handle & 0x1) { \
48#define IsPredefKey(HKey) \
49 (((ULONG_PTR)(HKey) & 0xF0000000) == 0x80000000)
50#define GetPredefKeyIndex(HKey) \
51 ((ULONG_PTR)(HKey) & 0x0FFFFFFF)
72 TRACE(
"RegInitialize()\n");
95 TRACE(
"RegCleanup()\n");
143 WARN(
"MapDefaultHandle() no handle creator\n");
161 TRACE(
"MapDefaultKey (Key %x)\n",
Key);
242 TRACE(
"OpenClassesRootKey()\n");
270 TRACE(
"OpenLocalMachineKey()\n");
293 TRACE(
"OpenUsersKey()\n");
311 RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current");
313 TRACE(
"OpenCurrentConfigKey()\n");
325#ifndef _ADVAPI32_VISTA_
385 if (hNewHKey ==
NULL)
459 } REGP_COPY_KEYS, *PREGP_COPY_KEYS;
462 PREGP_COPY_KEYS copyKeys, newCopyKeys;
485 sizeof(REGP_COPY_KEYS));
486 if (copyKeys !=
NULL)
488 copyKeys->hKeySrc = hKeySrc;
489 copyKeys->hKeyDest = hKeyDest;
491 ©Keys->ListEntry);
510 &BufferSizeRequired);
525 Info.KeyValue->TitleIndex,
528 Info.KeyValue->DataLength);
588 &BufferSizeRequired);
627 Info.KeyNode->TitleIndex,
635 sizeof(REGP_COPY_KEYS));
636 if (newCopyKeys !=
NULL)
640 newCopyKeys->hKeyDest = NewKeyHandle;
642 &newCopyKeys->ListEntry);
707 if (copyKeys->hKeySrc != hKeySrc)
711 if (copyKeys->hKeyDest != hKeyDest)
761 if (lpSubKey !=
NULL)
808#ifndef _ADVAPI32_VISTA_
823 if (lpSubKey !=
NULL &&
852 if (lpMachineName !=
NULL &&
882 if (!lpMachineName || !*lpMachineName)
893 if( lpMachineName[0] ==
'\\' && lpMachineName[1] ==
'\\')
898 if (!
_wcsicmp(lpMachineName, compName))
925 DWORD *lpdwDisposition)
931 ULONG FullNameLength;
953 LocalObjectAttributes.
ObjectName = &LocalKeyName;
954 FullNameLength = LocalKeyName.
Length /
sizeof(
WCHAR);
956 LocalKeyHandle =
NULL;
973 &LocalObjectAttributes,
978 TRACE(
"NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName,
Status);
998 if (
Length == FullNameLength)
1006 (
PULONG)lpdwDisposition);
1012 &LocalObjectAttributes,
1017 TRACE(
"NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName,
Status);
1049 RtlInitEmptyUnicodeString(&ClassString,
NULL, 0);
1050 RtlInitEmptyUnicodeString(&SubKeyString,
NULL, 0);
1077 lpSecurityAttributes,
1114 TRACE(
"RegCreateKeyExW() called\n");
1135 lpSecurityAttributes,
1156 (lpClass ==
NULL)?
NULL : &ClassString,
1320 ERR(
"Wow64 not yet supported!\n");
1323 ERR(
"Wow64 not yet supported!\n");
1378 if (hSubKey !=
hKey)
1399 if (lpSubKey !=
NULL &&
1405 if (lpValueName !=
NULL &&
1431 } REGP_DEL_KEYS, *PREG_DEL_KEYS;
1434 PREG_DEL_KEYS delKeys, newDelKeys;
1438 PREG_DEL_KEYS KeyDelRoot;
1451 sizeof(REGP_DEL_KEYS));
1452 if (KeyDelRoot !=
NULL)
1454 KeyDelRoot->KeyHandle =
hKey;
1456 &KeyDelRoot->ListEntry);
1498 Status2 =
NtOpenKey(&newDelKeys->KeyHandle,
1508 &newDelKeys->ListEntry);
1520 if (newDelKeys !=
NULL)
1525 goto ReadFirstSubKey;
1531 goto SubKeyFailureNoFree;
1536 PREG_DEL_KEYS newDelKeys2;
1545 if (newDelKeys2 !=
NULL)
1547 newDelKeys = newDelKeys2;
1551 goto ReadFirstSubKey;
1564 if (newDelKeys !=
NULL)
1576 if (newDelKeys !=
NULL)
1601 if (delKeys->KeyHandle !=
hKey)
1647 if (lpSubKey !=
NULL)
1673 Status = RegpDeleteTree(CurKey);
1715 DWORD dwMaxSubkeyLen, dwMaxValueLen;
1750 dwMaxLen =
max(dwMaxSubkeyLen, dwMaxValueLen);
1751 if (dwMaxLen >
sizeof(szNameBuf)/
sizeof(
WCHAR))
1788 if (lpszName != szNameBuf)
1811 if (lpSubKey !=
NULL &&
1825#ifndef _ADVAPI32_VISTA_
1835 FIXME(
"RegDisableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase);
1848 FIXME(
"RegEnableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase);
1892 if (cbExpect && cbData != cbExpect)
1943 TRACE(
"(%p,%s,%s,%ld,%p,%p,%p=%ld)\n",
1953 if (pszSubKey && pszSubKey[0])
1980 &dwType, pvBuf, &cbData);
2013 if (pszSubKey && pszSubKey[0])
2049 TRACE(
"(%p,%s,%s,%ld,%p,%p,%p=%ld)\n",
2059 if (pszSubKey && pszSubKey[0])
2085 &dwType, pvBuf, &cbData);
2117 if (pszSubKey && pszSubKey[0])
2125 if (pdwType) *pdwType = dwType;
2157 if (lpSubKey !=
NULL)
2202#ifndef _ADVAPI32_VISTA_
2228 if (lpSubKey !=
NULL)
2431 DWORD NameLength, ClassLength;
2437 NameLength = *lpcbName;
2439 if (NameBuffer ==
NULL)
2450 ClassLength = *lpcbClass;
2452 if (ClassBuffer ==
NULL)
2477 if (NameLength > *lpcbName)
2478 lpName[*lpcbName] =
'\0';
2483 if (ClassLength > *lpcbClass)
2484 lpClass[*lpcbClass] =
'\0';
2523 ULONG ClassLength = 0;
2580 if (KeyInfo ==
NULL)
2592 TRACE(
"NtEnumerateKey() returned status 0x%X\n",
Status);
2599 if (lpClass ==
NULL)
2601 if (KeyInfo->Basic.NameLength > NameLength)
2608 KeyInfo->Basic.Name,
2609 KeyInfo->Basic.NameLength);
2610 *lpcbName = (
DWORD)(KeyInfo->Basic.NameLength /
sizeof(
WCHAR));
2616 if (KeyInfo->Node.NameLength > NameLength ||
2617 KeyInfo->Node.ClassLength > ClassLength)
2625 KeyInfo->Node.NameLength);
2626 *lpcbName = KeyInfo->Node.NameLength /
sizeof(
WCHAR);
2629 (
PVOID)((
ULONG_PTR)KeyInfo->Node.Name + KeyInfo->Node.ClassOffset),
2630 KeyInfo->Node.ClassLength);
2631 *lpcbClass = (
DWORD)(KeyInfo->Node.ClassLength /
sizeof(
WCHAR));
2632 lpClass[*lpcbClass] = 0;
2638 if (lpClass ==
NULL)
2640 lpftLastWriteTime->dwLowDateTime = KeyInfo->Basic.LastWriteTime.u.LowPart;
2641 lpftLastWriteTime->dwHighDateTime = KeyInfo->Basic.LastWriteTime.u.HighPart;
2645 lpftLastWriteTime->dwLowDateTime = KeyInfo->Node.LastWriteTime.u.LowPart;
2646 lpftLastWriteTime->dwHighDateTime = KeyInfo->Node.LastWriteTime.u.HighPart;
2679 DWORD NameBufferSize, NameLength;
2685 if (!
lpName || !lpcbName)
2688 if ((lpData && !lpcbData) || lpdwReserved)
2693 hKey,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL, &NameBufferSize,
NULL,
NULL,
NULL);
2702 if (NameBuffer ==
NULL)
2713 NameLength = *lpcbName;
2726 NameOverflow =
TRUE;
2734 DWORD DataBufferSize = *lpcbData *
sizeof(
WCHAR);
2753 *lpcbData = DataBufferSize /
sizeof(
WCHAR);
2767 if ((
DataLength > *lpcbData) && (DataStr[*lpcbData - 1] !=
'\0'))
2768 DataStr[*lpcbData] =
'\0';
2847 TRACE(
"(%p,%ld,%p,%p,%p,%p,%p,%p)\n",
2850 if (!
value || !val_count)
2879 total_size =
min(
sizeof(
buffer), total_size );
2882 buffer, total_size, &total_size );
2898 buf_ptr, total_size, &total_size );
2905 if (
info->NameLength/
sizeof(
WCHAR) >= *val_count)
2911 *val_count =
info->NameLength /
sizeof(
WCHAR);
2912 value[*val_count] = 0;
2990 LPDWORD lpcbSecurityDescriptor)
3004 TRACE(
"MapDefaultKey() failed (Status %lx)\n",
Status);
3010 pSecurityDescriptor,
3011 *lpcbSecurityDescriptor,
3012 lpcbSecurityDescriptor);
3018 WARN(
"NtQuerySecurityObject() failed (Status %lx)\n",
Status);
3154 DWORD dwNotifyFilter,
3238 TRACE(
"RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n",
3239 hKey, lpSubKey, phkResult);
3244 if (!
hKey && !lpSubKey)
3272 TRACE(
"RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n",
3273 hKey, lpSubKey, phkResult);
3278 if (!
hKey && !lpSubKey)
3308 TRACE(
"RegOpenKeyExA hKey 0x%x lpSubKey %s ulOptions 0x%x samDesired 0x%x phkResult %p\n",
3309 hKey, lpSubKey, ulOptions, samDesired, phkResult);
3317 RtlInitEmptyUnicodeString(&SubKeyString,
NULL, 0);
3347 TRACE(
"RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n",
3348 hKey, lpSubKey, ulOptions, samDesired, phkResult);
3354 if (!
hKey && lpSubKey && phkResult)
3381 if (lpSubKey ==
NULL ||
wcscmp(lpSubKey,
L"\\") == 0)
3402 SubKeyString = AlignedString;
3403 SubKeyStringAllocated =
TRUE;
3419 if (SubKeyStringAllocated)
3446 const WCHAR UserClassesKeyPrefix[] =
L"\\Registry\\User\\";
3447 const WCHAR UserClassesKeySuffix[] =
L"_Classes";
3482 if (TokenUserData ==
NULL)
3529 UserClassesKeyRoot.
Length = 0;
3531 sizeof(UserClassesKeyPrefix) +
3532 sizeof(UserClassesKeySuffix);
3544 UserClassesKeyPrefix);
3548 UserClassesKeySuffix);
3550 TRACE(
"RegOpenUserClassesRoot: Absolute path: %wZ\n", &UserClassesKeyRoot);
3556 &UserClassesKeyRoot,
3593 LPDWORD lpcbSecurityDescriptor,
3603 if ((lpClass) && (!lpcClass))
3610 if (lpClass !=
NULL)
3615 cClass =
sizeof(ClassName) /
sizeof(
WCHAR);
3628 lpcbSecurityDescriptor,
3637 RtlInitEmptyAnsiString(&
AnsiString, lpClass, *lpcClass);
3647 if (lpcClass !=
NULL)
3672 LPDWORD lpcbSecurityDescriptor,
3678 ULONG ClassLength = 0;
3684 if ((lpClass) && (!lpcClass))
3699 lpcSubKeys, lpcMaxSubKeyLen, lpcMaxClassLen,
3700 lpcValues, lpcMaxValueNameLen, lpcMaxValueLen,
3701 lpcbSecurityDescriptor, lpftLastWriteTime);
3706 if (lpClass !=
NULL)
3721 if (FullInfo ==
NULL)
3730 FullInfo = &FullInfoBuffer;
3733 if (lpcbSecurityDescriptor !=
NULL)
3734 *lpcbSecurityDescriptor = 0;
3741 TRACE(
"NtQueryKey() returned status 0x%X\n",
Status);
3749 if (lpcSubKeys !=
NULL)
3751 *lpcSubKeys = FullInfo->
SubKeys;
3755 if (lpcMaxSubKeyLen !=
NULL)
3761 if (lpcMaxClassLen !=
NULL)
3767 if (lpcValues !=
NULL)
3769 *lpcValues = FullInfo->
Values;
3773 if (lpcMaxValueNameLen !=
NULL)
3779 if (lpcMaxValueLen !=
NULL)
3784 if (lpcbSecurityDescriptor !=
NULL)
3792 lpcbSecurityDescriptor);
3793 TRACE(
"NtQuerySecurityObject() returned status 0x%X\n",
Status);
3796 if (lpftLastWriteTime !=
NULL)
3802 if (lpClass !=
NULL)
3822 if (lpcClass !=
NULL)
3828 if (lpClass !=
NULL)
3854 DWORD maxBytes = *ldwTotsize;
3858 if (maxBytes >= (1024*1024))
3863 TRACE(
"RegQueryMultipleValuesA(%p,%p,%ld,%p,%p=%ld)\n",
3864 hKey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
3866 for (
i = 0;
i < num_vals;
i++)
3870 val_list[
i].ve_valuename,
3874 &val_list[
i].ve_valuelen);
3880 if (lpValueBuf !=
NULL && *ldwTotsize + val_list[
i].ve_valuelen <= maxBytes)
3883 val_list[
i].ve_valuename,
3885 &val_list[
i].ve_type,
3887 &val_list[
i].ve_valuelen);
3918 DWORD maxBytes = *ldwTotsize;
3922 if (maxBytes >= (1024*1024))
3927 TRACE(
"RegQueryMultipleValuesW(%p,%p,%ld,%p,%p=%ld)\n",
3928 hKey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
3930 for (
i = 0;
i < num_vals;
i++)
3934 val_list[
i].ve_valuename,
3938 &val_list[
i].ve_valuelen);
3944 if (lpValueBuf !=
NULL && *ldwTotsize + val_list[
i].ve_valuelen <= maxBytes)
3947 val_list[
i].ve_valuename,
3949 &val_list[
i].ve_type,
3951 &val_list[
i].ve_valuelen);
3976 OUT BOOL* bIsReflectionDisabled)
3978 FIXME(
"RegQueryReflectionKey(0x%p, 0x%p) UNIMPLEMENTED!\n",
3979 hBase, bIsReflectionDisabled);
4035 RtlInitEmptyUnicodeString(&
nameW,
NULL, 0);
4088 DataStr[*
count] =
'\0';
4119 TRACE(
"(%p,%s,%p,%p,%p,%p=%d)\n",
4143 total_size = info_size;
4147 buffer, total_size, &total_size );
4179 buf_ptr, total_size, &total_size );
4184 memcpy(
data, buf_ptr + info_size, total_size - info_size );
4296 RtlInitEmptyUnicodeString(&SubKey,
NULL, 0);
4297 RtlInitEmptyUnicodeString(&OldFile,
NULL, 0);
4298 RtlInitEmptyUnicodeString(&NewFile,
NULL, 0);
4377 if (lpSubKey !=
NULL && *lpSubKey != (
WCHAR)0)
4387 &KeyObjectAttributes);
4394 CloseRealKey =
TRUE;
4399 CloseRealKey =
FALSE;
4449 &OldObjectAttributes);
4604 lpSecurityAttributes);
4645 if (lpSecurityAttributes !=
NULL)
4715 lpSecurityAttributes,
4745 FIXME(
"RegSaveKeyExW(): Flags ignored!\n");
4749 lpSecurityAttributes);
4780 pSecurityDescriptor);
4816 if (lpValueName !=
NULL && lpValueName[0] !=
'\0')
4833 LONG bNoNulledStr = ((lpData[cbData-1] !=
'\0') ? 1 : 0);
4836 AnsiString.MaximumLength = cbData + bNoNulledStr;
4843 if (pValueName !=
NULL)
4865 if (pValueName !=
NULL)
4914 if((pwsData[cbData /
sizeof(
WCHAR) - 1] !=
L'\0') &&
4915 (pwsData[cbData /
sizeof(
WCHAR)] ==
L'\0'))
4918 cbData +=
sizeof(
WCHAR);
4976 if (lpSubKey && lpSubKey[0])
5013 if (dwType !=
REG_SZ || !lpData)
5024 if (lpSubKey && lpSubKey[0])
5134 if (
HIWORD(resId) == 0xffff)
5135 resId = (
UINT)(-((
INT)resId));
5139 if (!hResource)
return 0;
5145 idxString = resId & 0xf;
5149 if (!pwszBuffer)
return *
pString;
5156 pwszBuffer[cMaxChars] =
L'\0';
5177 DWORD dwValueType, cbData;
5182 if (!
hKey || !pszOutBuf)
5185 if (pszDirectory && *pszDirectory)
5187 FIXME(
"BaseDir parameter not yet supported!\n");
5200 if (!pwszTempBuffer)
5214 if (!pwszExpandedBuffer)
5224 memcpy(pwszExpandedBuffer, pwszTempBuffer, cbData);
5230 if (*pwszExpandedBuffer !=
L'@')
5232 lstrcpynW(pszOutBuf, pwszExpandedBuffer, cbOutBuf /
sizeof(
WCHAR));
5241 if (!pComma || pComma[1] !=
L'-')
5247 uiStringId =
_wtoi(pComma + 2);
ACPI_SIZE strlen(const char *String)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define RegCloseKey(hKey)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_IMPLEMENTED
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NT_SUCCESS(StatCode)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOverridePredefKey(IN HKEY hKey, IN HKEY hNewHKey OPTIONAL)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegUnLoadKeyW(HKEY hKey, LPCWSTR lpSubKey)
LONG WINAPI RegLoadKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpFile)
#define ClosePredefKey(Handle)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
static VOID CloseDefaultKeys(VOID)
LONG WINAPI RegCopyTreeW(IN HKEY hKeySrc, IN LPCWSTR lpSubKey OPTIONAL, IN HKEY hKeyDest)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
static NTSTATUS OpenLocalMachineKey(PHANDLE KeyHandle)
LONG WINAPI RegFlushKey(HKEY hKey)
static NTSTATUS OpenClassesRootKey(PHANDLE KeyHandle)
LONG WINAPI RegDeleteTreeA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegDisablePredefinedCacheEx(VOID)
static HANDLE ProcessHeap
#define REG_MAX_NAME_SIZE
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryReflectionKey(IN HKEY hBase, OUT BOOL *bIsReflectionDisabled)
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
LONG WINAPI RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
LONG WINAPI RegGetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, LPDWORD lpcbSecurityDescriptor)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
LONG WINAPI RegReplaceKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewFile, LPCWSTR lpOldFile)
static HANDLE DefaultHandleTable[MAX_DEFAULT_HANDLES]
LONG WINAPI RegLoadKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpFile)
LONG WINAPI RegDeleteKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cbName)
static BOOLEAN DefaultHandlesDisabled
LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
LONG WINAPI RegSetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
static NTSTATUS CreateNestedKey(PHKEY KeyHandle, POBJECT_ATTRIBUTES ObjectAttributes, PUNICODE_STRING ClassString, DWORD dwOptions, REGSAM samDesired, DWORD *lpdwDisposition)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
static __inline int is_string(DWORD type)
LONG WINAPI RegLoadMUIStringW(IN HKEY hKey, IN LPCWSTR pszValue OPTIONAL, OUT LPWSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCWSTR pszDirectory OPTIONAL)
LONG WINAPI RegQueryMultipleValuesW(HKEY hKey, PVALENTW val_list, DWORD num_vals, LPWSTR lpValueBuf, LPDWORD ldwTotsize)
LSTATUS WINAPI RegQueryValueA(HKEY hkey, LPCSTR name, LPSTR data, LPLONG count)
static BOOLEAN DefaultHandleHKUDisabled
static NTSTATUS OpenCurrentConfigKey(PHANDLE KeyHandle)
static NTSTATUS OpenUsersKey(PHANDLE KeyHandle)
static NTSTATUS MapDefaultKey(PHANDLE ParentKey, HKEY Key)
LSTATUS WINAPI RegGetValueA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
static NTSTATUS RegpCopyTree(IN HKEY hKeySrc, IN HKEY hKeyDest)
LONG WINAPI RegDisablePredefinedCache(VOID)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
static NTSTATUS OpenPredefinedKey(IN ULONG Index, OUT HANDLE Handle)
LONG WINAPI RegRestoreKeyW(HKEY hKey, LPCWSTR lpFile, DWORD dwFlags)
LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName, HKEY hKey, PHKEY phkResult)
LONG WINAPI RegSaveKeyExA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD Flags)
#define MAX_DEFAULT_HANDLES
LONG WINAPI RegQueryMultipleValuesA(HKEY hKey, PVALENTA val_list, DWORD num_vals, LPSTR lpValueBuf, LPDWORD ldwTotsize)
LONG WINAPI RegEnableReflectionKey(IN HKEY hBase)
static RTL_CRITICAL_SECTION HandleTableCS
LONG WINAPI RegOpenUserClassesRoot(IN HANDLE hToken, IN DWORD dwOptions, IN REGSAM samDesired, OUT PHKEY phkResult)
#define IsPredefKey(HKey)
static VOID RegpApplyRestrictions(DWORD dwFlags, DWORD dwType, DWORD cbData, PLONG ret)
LONG WINAPI RegRestoreKeyA(HKEY hKey, LPCSTR lpFile, DWORD dwFlags)
LONG WINAPI RegReplaceKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpNewFile, LPCSTR lpOldFile)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
LSTATUS WINAPI RegQueryValueW(HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count)
#define GetPredefKeyIndex(HKey)
LONG WINAPI RegSaveKeyW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
LONG WINAPI RegCopyTreeA(IN HKEY hKeySrc, IN LPCSTR lpSubKey OPTIONAL, IN HKEY hKeyDest)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegSaveKeyA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
LONG WINAPI RegLoadMUIStringA(IN HKEY hKey, IN LPCSTR pszValue OPTIONAL, OUT LPSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCSTR pszDirectory OPTIONAL)
static BOOLEAN DllInitialized
LONG WINAPI RegConnectRegistryA(IN LPCSTR lpMachineName, IN HKEY hKey, OUT PHKEY phkResult)
LONG WINAPI RegSaveKeyExW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD Flags)
LONG WINAPI RegDisableReflectionKey(IN HKEY hBase)
LONG WINAPI RegDeleteKeyValueW(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValueName OPTIONAL)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegNotifyChangeKeyValue(HKEY hKey, BOOL bWatchSubtree, DWORD dwNotifyFilter, HANDLE hEvent, BOOL fAsynchronous)
LONG WINAPI RegSetValueW(HKEY hKeyOriginal, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegDeleteKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
LONG WINAPI RegUnLoadKeyA(HKEY hKey, LPCSTR lpSubKey)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
LONG WINAPI RegSetKeyValueW(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
FORCEINLINE BOOL IsHKCRKey(_In_ HKEY hKey)
FORCEINLINE void MakeHKCRKey(_Inout_ HKEY *hKey)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
static DWORD DWORD * dwLength
static void cleanup(void)
static const WCHAR valueW[]
DWORD WINAPI ExpandEnvironmentStringsA(IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
#define RRF_RT_REG_BINARY
#define RRF_ZEROONFAILURE
#define RRF_RT_REG_MULTI_SZ
#define RRF_RT_REG_EXPAND_SZ
static const WCHAR Cleanup[]
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define InitializeListHead(ListHead)
struct _FileName FileName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
#define FILE_SYNCHRONOUS_IO_NONALERT
#define FILE_OPEN_FOR_BACKUP_INTENT
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
LONG WINAPI QueryInfoHKCRKey(_In_ HKEY hKey, _Out_writes_to_opt_(*lpcchClass, *lpcchClass+1) LPWSTR lpClass, _Inout_opt_ LPDWORD lpcchClass, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPDWORD lpcSubKeys, _Out_opt_ LPDWORD lpcbMaxSubKeyLen, _Out_opt_ LPDWORD lpcbMaxClassLen, _Out_opt_ LPDWORD lpcValues, _Out_opt_ LPDWORD lpcbMaxValueNameLen, _Out_opt_ LPDWORD lpcbMaxValueLen, _Out_opt_ LPDWORD lpcbSecurityDescriptor, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI CreateHKCRKey(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI QueryHKCRValue(_In_ HKEY hKey, _In_ LPCWSTR Name, _In_ LPDWORD Reserved, _In_ LPDWORD Type, _In_ LPBYTE Data, _In_ LPDWORD Count)
LONG WINAPI EnumHKCRValue(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ PDWORD lpcbName, _Reserved_ PDWORD lpReserved, _Out_opt_ PDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ PDWORD lpcbData)
LONG WINAPI DeleteHKCRValue(_In_ HKEY hKey, _In_ PUNICODE_STRING ValueName)
LONG WINAPI SetHKCRValue(_In_ HKEY hKey, _In_ LPCWSTR Name, _In_ DWORD Reserved, _In_ DWORD Type, _In_ CONST BYTE *Data, _In_ DWORD DataSize)
LONG WINAPI OpenHKCRKey(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _In_ PHKEY phkResult)
LONG WINAPI DeleteHKCRKey(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ REGSAM RegSam, _In_ DWORD Reserved)
LONG WINAPI EnumHKCRKey(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
#define EXCEPTION_EXECUTE_HANDLER
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
DWORD SECURITY_INFORMATION
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
_In_ NDIS_ERROR_CODE ErrorCode
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING _Out_ PNDIS_HANDLE SubKeyHandle
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
#define REG_OPTION_OPEN_LINK
@ KeyValuePartialInformation
@ KeyValueFullInformation
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
NTSYSAPI NTSTATUS NTAPI NtDeleteValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName)
struct _KEY_BASIC_INFORMATION KEY_BASIC_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define KEY_CREATE_SUB_KEY
struct _KEY_NODE_INFORMATION KEY_NODE_INFORMATION
struct _KEY_BASIC_INFORMATION * PKEY_BASIC_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
struct _KEY_FULL_INFORMATION KEY_FULL_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtEnumerateKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_INFORMATION_CLASS KeyInformationClass, IN PVOID KeyInformation, IN ULONG Length, IN PULONG ResultLength)
#define KEY_ENUMERATE_SUB_KEYS
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
#define FILE_GENERIC_READ
NTSTATUS NTAPI NtUnloadKey(IN POBJECT_ATTRIBUTES KeyObjectAttributes)
NTSTATUS NTAPI NtDeleteKey(IN HANDLE KeyHandle)
NTSTATUS NTAPI NtNotifyChangeKey(IN HANDLE KeyHandle, IN HANDLE Event, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG CompletionFilter, IN BOOLEAN WatchTree, OUT PVOID Buffer, IN ULONG Length, IN BOOLEAN Asynchronous)
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
NTSTATUS NTAPI NtFlushKey(IN HANDLE KeyHandle)
NTSTATUS NTAPI NtSaveKey(IN HANDLE KeyHandle, IN HANDLE FileHandle)
NTSTATUS NTAPI NtEnumerateValueKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength)
NTSTATUS NTAPI NtLoadKey(IN POBJECT_ATTRIBUTES KeyObjectAttributes, IN POBJECT_ATTRIBUTES FileObjectAttributes)
NTSTATUS NTAPI NtQueryKey(IN HANDLE KeyHandle, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength)
NTSTATUS NTAPI NtRestoreKey(IN HANDLE KeyHandle, IN HANDLE FileHandle, IN ULONG RestoreFlags)
NTSTATUS NTAPI NtReplaceKey(IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE Key, IN POBJECT_ATTRIBUTES ReplacedObjectAttributes)
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSYSAPI NTSTATUS NTAPI RtlConvertSidToUnicodeString(OUT PUNICODE_STRING DestinationString, IN PVOID Sid, IN BOOLEAN AllocateDestinationString)
#define STATUS_NO_MORE_ENTRIES
NTSTATUS NTAPI NtQuerySecurityObject(IN HANDLE Handle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN ULONG Length, OUT PULONG ResultLength)
#define _SEH2_EXCEPT(...)
#define offsetof(TYPE, MEMBER)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_In_ DWORD _Out_ PDWORD _In_opt_ PCSTR MachineName
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
NTSTATUS WINAPI NtSetSecurityObject(HANDLE Handle, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR SecurityDescriptor)
PULONG MinorVersion OPTIONAL
struct _LIST_ENTRY * Flink
PUNICODE_STRING ObjectName
LPVOID lpSecurityDescriptor
static unsigned int bufptr
_Must_inspect_result_ __kernel_entry NTSTATUS NTAPI NtQueryInformationToken(_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_writes_bytes_to_opt_(TokenInformationLength, *ReturnLength) PVOID TokenInformation, _In_ ULONG TokenInformationLength, _Out_ PULONG ReturnLength)
Queries a specific type of information in regard of an access token based upon the information class....
#define RTL_CONSTANT_STRING(s)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
struct _LARGE_INTEGER::@2299 u
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ PWDFDEVICE_INIT _In_ PWDF_FILEOBJECT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES FileObjectAttributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
DWORD WINAPI GetLastError(void)
#define LOAD_LIBRARY_AS_DATAFILE
#define MAX_COMPUTERNAME_LENGTH
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
_In_ ULONG _In_opt_ PVOID pvData
_Reserved_ PVOID Reserved
#define ERROR_BAD_NETPATH
#define ERROR_UNSUPPORTED_TYPE
#define ERROR_BAD_PATHNAME
#define ERROR_DATATYPE_MISMATCH
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_CONFIG
#define HKEY_CURRENT_USER
#define HKEY_PERFORMANCE_DATA
#define HKEY_CLASSES_ROOT
#define MAKEINTRESOURCEW(i)
_In_ ULONG _Out_opt_ PULONG RequiredLength
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
_Must_inspect_result_ _In_ ULONG Flags
#define REG_LATEST_FORMAT
#define REG_NO_COMPRESSION
#define REG_STANDARD_FORMAT
#define DACL_SECURITY_INFORMATION
#define OWNER_SECURITY_INFORMATION
#define GROUP_SECURITY_INFORMATION