Author: hbelusca
Date: Sat Jan 16 23:54:45 2016
New Revision: 70601
URL: http://svn.reactos.org/svn/reactos?rev=70601&view=rev
Log:
[CMLIB]
- One less hardcoded number.
- Minor code formatting.
[NTOS]
- Minor code formatting (cmvalche.c).
- The key-node timestamp can usually be retrieved without using another temporary value.
- The security descriptor copy allocated for the hive can be freed after it was assigned to it.
[MKHIVE]
- Minor formatting of the source headers.
- Update the list of registry value types; add another error code (to be used later on).
- Remove now unused "ntoskrnl.h" header.
CORE-10793
Removed:
trunk/reactos/tools/mkhive/ntoskrnl.h
Modified:
trunk/reactos/lib/cmlib/cmindex.c
trunk/reactos/lib/cmlib/cmname.c
trunk/reactos/lib/cmlib/cmvalue.c
trunk/reactos/lib/cmlib/hivewrt.c
trunk/reactos/ntoskrnl/config/cmparse.c
trunk/reactos/ntoskrnl/config/cmsysini.c
trunk/reactos/ntoskrnl/config/cmvalche.c
trunk/reactos/tools/mkhive/binhive.c
trunk/reactos/tools/mkhive/binhive.h
trunk/reactos/tools/mkhive/reginf.c
trunk/reactos/tools/mkhive/reginf.h
trunk/reactos/tools/mkhive/registry.h
Modified: trunk/reactos/lib/cmlib/cmindex.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmindex.c?rev=70…
==============================================================================
--- trunk/reactos/lib/cmlib/cmindex.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmindex.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -10,19 +10,19 @@
#include "cmlib.h"
#define NDEBUG
-#include "debug.h"
+#include <debug.h>
/* GLOBALS *******************************************************************/
-ULONG CmpMaxFastIndexPerHblock =
- (HBLOCK_SIZE - (sizeof(HBIN) +
- sizeof(HCELL) +
- FIELD_OFFSET(CM_KEY_FAST_INDEX, List))) / sizeof(CM_INDEX);
-
-ULONG CmpMaxIndexPerHblock =
- (HBLOCK_SIZE - (sizeof(HBIN) +
- sizeof(HCELL) +
- FIELD_OFFSET(CM_KEY_INDEX, List))) / sizeof(HCELL_INDEX) - 1;
+#define INVALID_INDEX 0x80000000
+
+#define CmpMaxFastIndexPerHblock \
+ ((HBLOCK_SIZE - (sizeof(HBIN) + sizeof(HCELL) + \
+ FIELD_OFFSET(CM_KEY_FAST_INDEX, List))) / sizeof(CM_INDEX))
+
+#define CmpMaxIndexPerHblock \
+ ((HBLOCK_SIZE - (sizeof(HBIN) + sizeof(HCELL) + \
+ FIELD_OFFSET(CM_KEY_INDEX, List))) / sizeof(HCELL_INDEX) - 1)
/* FUNCTIONS *****************************************************************/
@@ -232,7 +232,7 @@
{
Big:
/* This was some sort of special key */
- ReturnIndex = 0x80000000;
+ ReturnIndex = INVALID_INDEX;
goto ReturnFailure;
}
@@ -262,7 +262,7 @@
/* Check if we found it */
if (!Result)
{
- /* We got lucky...return it */
+ /* We got lucky... return it */
*SubKey = LeafCell;
ReturnIndex = Low;
goto Return;
@@ -389,7 +389,7 @@
{
/* Fail with special value */
*SubKey = HCELL_NIL;
- return 0x80000000;
+ return INVALID_INDEX;
}
/* Check if we got lucky and found it */
@@ -425,7 +425,7 @@
{
/* Fail with special value */
*SubKey = HCELL_NIL;
- return 0x80000000;
+ return INVALID_INDEX;
}
/* Check if we got lucky and found it */
@@ -448,7 +448,7 @@
{
/* Fail with special value */
*SubKey = HCELL_NIL;
- return 0x80000000;
+ return INVALID_INDEX;
}
/* Return the high */
@@ -625,8 +625,7 @@
if (Number < Node->SubKeyCounts[Volatile])
{
/* Get the actual key index */
- Index = (PCM_KEY_INDEX)HvGetCell(Hive,
- Node->SubKeyLists[Volatile]);
+ Index = (PCM_KEY_INDEX)HvGetCell(Hive, Node->SubKeyLists[Volatile]);
if (!Index) return HCELL_NIL;
/* Do a search inside it */
@@ -717,7 +716,7 @@
HvReleaseCell(Hive, CellToRelease);
/* Make sure we found something valid */
- if (Found & 0x80000000) break;
+ if (Found & INVALID_INDEX) break;
/* Get the new Index Root and set the new cell to be released */
if (SubKey == HCELL_NIL) continue;
@@ -744,7 +743,7 @@
HvReleaseCell(Hive, CellToRelease);
/* Make sure we found a valid index */
- if (Found & 0x80000000) break;
+ if (Found & INVALID_INDEX) break;
}
else
{
@@ -856,7 +855,7 @@
{
/* Get the child inside the root */
Result = CmpFindSubKeyInRoot(Hive, Index, &SearchName, &Child);
- if (Result & 0x80000000) goto Quickie;
+ if (Result & INVALID_INDEX) goto Quickie;
if (Child == HCELL_NIL) continue;
/* We found it, mark the cell dirty */
@@ -886,7 +885,7 @@
/* Find the child in the leaf */
Result = CmpFindSubKeyInLeaf(Hive, Index, &SearchName, &Child);
- if (Result & 0x80000000) goto Quickie;
+ if (Result & INVALID_INDEX) goto Quickie;
if (Child != HCELL_NIL)
{
/* We found it, free the name now */
@@ -1004,7 +1003,7 @@
/* Find the insertion point for our entry */
i = CmpFindSubKeyInLeaf(Hive, Leaf, Name, &Child);
- if (i & 0x80000000) return HCELL_NIL;
+ if (i & INVALID_INDEX) return HCELL_NIL;
ASSERT(Child == HCELL_NIL);
/* Check if we're not last */
@@ -1299,7 +1298,7 @@
SubKeyIndex = CmpFindSubKeyInRoot(Hive, IndexKey, Name, &LeafCell);
/* Make sure we found something valid */
- if (SubKeyIndex & 0x80000000) return HCELL_NIL;
+ if (SubKeyIndex & INVALID_INDEX) return HCELL_NIL;
/* Try to fit it into the LeafCell, if it was found */
if (LeafCell != HCELL_NIL)
@@ -1705,7 +1704,7 @@
HCELL_INDEX RootCell = HCELL_NIL, LeafCell, ChildCell;
PCM_KEY_INDEX Root = NULL, Leaf;
PCM_KEY_FAST_INDEX Child;
- ULONG Storage, RootIndex = 0x80000000, LeafIndex;
+ ULONG Storage, RootIndex = INVALID_INDEX, LeafIndex;
BOOLEAN Result = FALSE;
HCELL_INDEX CellToRelease1 = HCELL_NIL, CellToRelease2 = HCELL_NIL;
@@ -1784,7 +1783,7 @@
{
/* Find the child inside the root */
RootIndex = CmpFindSubKeyInRoot(Hive, Leaf, &SearchName, &ChildCell);
- if (RootIndex & 0x80000000) goto Exit;
+ if (RootIndex & INVALID_INDEX) goto Exit;
ASSERT(ChildCell != FALSE);
/* The root cell is now this leaf */
@@ -1807,7 +1806,7 @@
/* Now get the child in the leaf */
LeafIndex = CmpFindSubKeyInLeaf(Hive, Leaf, &SearchName, &ChildCell);
- if (LeafIndex & 0x80000000) goto Exit;
+ if (LeafIndex & INVALID_INDEX) goto Exit;
ASSERT(ChildCell != HCELL_NIL);
/* Decrement key counts and check if this was the last leaf entry */
Modified: trunk/reactos/lib/cmlib/cmname.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmname.c?rev=706…
==============================================================================
--- trunk/reactos/lib/cmlib/cmname.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmname.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -10,7 +10,7 @@
#include "cmlib.h"
#define NDEBUG
-#include "debug.h"
+#include <debug.h>
/* GLOBALS *******************************************************************/
@@ -110,8 +110,8 @@
IN PWCHAR CompressedName,
IN ULONG NameLength)
{
- WCHAR *p;
- UCHAR *pp;
+ WCHAR* p;
+ UCHAR* pp;
WCHAR chr1, chr2;
USHORT SearchLength;
LONG Result;
@@ -120,7 +120,7 @@
p = SearchName->Buffer;
pp = (PUCHAR)CompressedName;
SearchLength = (SearchName->Length / sizeof(WCHAR));
- while ((SearchLength) && (NameLength))
+ while (SearchLength > 0 && NameLength > 0)
{
/* Get the characters */
chr1 = *p++;
@@ -149,8 +149,8 @@
CmpFindNameInList(IN PHHIVE Hive,
IN PCHILD_LIST ChildList,
IN PUNICODE_STRING Name,
- IN PULONG ChildIndex,
- IN PHCELL_INDEX CellIndex)
+ OUT PULONG ChildIndex,
+ OUT PHCELL_INDEX CellIndex)
{
PCELL_DATA CellData;
HCELL_INDEX CellToRelease = HCELL_NIL;
@@ -199,14 +199,14 @@
/* Check if it's a compressed value name */
if (KeyValue->Flags & VALUE_COMP_NAME)
{
- /* Use the compressed name check */
+ /* Compare compressed names */
Result = CmpCompareCompressedName(Name,
KeyValue->Name,
KeyValue->NameLength);
}
else
{
- /* Setup the Unicode string */
+ /* Compare the Unicode name directly */
SearchName.Length = KeyValue->NameLength;
SearchName.MaximumLength = SearchName.Length;
SearchName.Buffer = KeyValue->Name;
@@ -216,7 +216,7 @@
/* Check if we found it */
if (!Result)
{
- /* We did...return info to caller */
+ /* We did... return info to caller */
if (ChildIndex) *ChildIndex = i;
*CellIndex = CellData->u.KeyList[i];
@@ -235,7 +235,7 @@
goto Return;
}
- /* Nothing found...check if the caller wanted more info */
+ /* Nothing found... check if the caller wanted more info */
ASSERT(ChildList->Count == 0);
if (ChildIndex) *ChildIndex = 0;
*CellIndex = HCELL_NIL;
Modified: trunk/reactos/lib/cmlib/cmvalue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmvalue.c?rev=70…
==============================================================================
--- trunk/reactos/lib/cmlib/cmvalue.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmvalue.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -109,7 +109,7 @@
NULL,
&CellIndex))
{
- /* Santy check */
+ /* Sanity check */
ASSERT(CellIndex == HCELL_NIL);
}
@@ -117,11 +117,14 @@
return CellIndex;
}
+/*
+ * NOTE: This function should support big values, contrary to CmpValueToData.
+ */
BOOLEAN
NTAPI
CmpGetValueData(IN PHHIVE Hive,
IN PCM_KEY_VALUE Value,
- IN PULONG Length,
+ OUT PULONG Length,
OUT PVOID *Buffer,
OUT PBOOLEAN BufferAllocated,
OUT PHCELL_INDEX CellToRelease)
@@ -144,7 +147,7 @@
return TRUE;
}
- /* Unsupported */
+ /* Unsupported at the moment */
ASSERT_VALUE_BIG(Hive, *Length);
/* Get the data from the cell */
@@ -156,6 +159,9 @@
return TRUE;
}
+/*
+ * NOTE: This function doesn't support big values, contrary to CmpGetValueData.
+ */
PCELL_DATA
NTAPI
CmpValueToData(IN PHHIVE Hive,
@@ -409,7 +415,6 @@
IN PHHIVE DestinationHive,
IN OUT PCHILD_LIST DestValueList,
IN HSTORAGE_TYPE StorageType)
-
{
NTSTATUS Status = STATUS_SUCCESS;
HCELL_INDEX CellIndex = HCELL_NIL;
Modified: trunk/reactos/lib/cmlib/hivewrt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivewrt.c?rev=70…
==============================================================================
--- trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -118,10 +118,10 @@
DPRINT("FileFlush failed\n");
}
- /* Update second update counter and CheckSum. */
+ /* Update second update counter and CheckSum */
RegistryHive->BaseBlock->Sequence2++;
RegistryHive->BaseBlock->CheckSum =
- HvpHiveHeaderChecksum(RegistryHive->BaseBlock);
+ HvpHiveHeaderChecksum(RegistryHive->BaseBlock);
/* Write hive header again with updated sequence counter. */
FileOffset = 0;
@@ -170,7 +170,7 @@
RegistryHive->BaseBlock->Type = HFILE_TYPE_PRIMARY;
RegistryHive->BaseBlock->Sequence1++;
RegistryHive->BaseBlock->CheckSum =
- HvpHiveHeaderChecksum(RegistryHive->BaseBlock);
+ HvpHiveHeaderChecksum(RegistryHive->BaseBlock);
/* Write hive block */
FileOffset = 0;
Modified: trunk/reactos/ntoskrnl/config/cmparse.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -219,7 +219,6 @@
PCM_KEY_NODE KeyNode;
PCELL_DATA CellData;
ULONG StorageType;
- LARGE_INTEGER SystemTime;
PCM_KEY_CONTROL_BLOCK Kcb;
PSECURITY_DESCRIPTOR NewDescriptor;
@@ -312,8 +311,7 @@
/* Fill out the key node */
KeyNode->Signature = CM_KEY_NODE_SIGNATURE;
KeyNode->Flags = Flags;
- KeQuerySystemTime(&SystemTime);
- KeyNode->LastWriteTime = SystemTime;
+ KeQuerySystemTime(&KeyNode->LastWriteTime);
KeyNode->Spare = 0;
KeyNode->Parent = ParentCell;
KeyNode->SubKeyCounts[Stable] = 0;
@@ -377,6 +375,9 @@
CmpKeyObjectType->TypeInfo.PoolType,
&CmpKeyObjectType->TypeInfo.GenericMapping);
}
+
+ /* Now that the security descriptor is copied in the hive, we can free the original */
+ SeDeassignSecurity(&NewDescriptor);
Quickie:
/* Check if we got here because of failure */
@@ -516,7 +517,7 @@
KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen = Name->Length;
}
- /* Check if we need toupdate class length maximum */
+ /* Check if we need to update class length maximum */
if (KeyNode->MaxClassLen < ParseContext->Class.Length)
{
/* Update it */
@@ -925,7 +926,7 @@
KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen = Name.Length;
}
- /* Check if we need toupdate class length maximum */
+ /* Check if we need to update class length maximum */
if (KeyNode->MaxClassLen < Context->Class.Length)
{
/* Update it */
Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -1030,7 +1030,6 @@
{
UNICODE_STRING KeyName;
PCM_KEY_NODE KeyCell;
- LARGE_INTEGER SystemTime;
PAGED_CODE();
/* Initialize the node name and allocate it */
@@ -1048,10 +1047,9 @@
if (!KeyCell) return FALSE;
/* Setup the cell */
- KeyCell->Signature = (USHORT)CM_KEY_NODE_SIGNATURE;
+ KeyCell->Signature = CM_KEY_NODE_SIGNATURE;
KeyCell->Flags = KEY_HIVE_ENTRY | KEY_NO_DELETE;
- KeQuerySystemTime(&SystemTime);
- KeyCell->LastWriteTime = SystemTime;
+ KeQuerySystemTime(&KeyCell->LastWriteTime);
KeyCell->Parent = HCELL_NIL;
KeyCell->SubKeyCounts[Stable] = 0;
KeyCell->SubKeyCounts[Volatile] = 0;
@@ -1068,14 +1066,11 @@
KeyCell->MaxValueDataLen = 0;
/* Copy the name (this will also set the length) */
- KeyCell->NameLength = CmpCopyName(Hive, (PWCHAR)KeyCell->Name, &KeyName);
-
- /* Check if the name was compressed */
+ KeyCell->NameLength = CmpCopyName(Hive, KeyCell->Name, &KeyName);
+
+ /* Check if the name was compressed and set the flag if so */
if (KeyCell->NameLength < KeyName.Length)
- {
- /* Set the flag */
KeyCell->Flags |= KEY_COMP_NAME;
- }
/* Return success */
HvReleaseCell(Hive, *Index);
Modified: trunk/reactos/ntoskrnl/config/cmvalche.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmvalche.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmvalche.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmvalche.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -249,14 +249,14 @@
}
/* Get the key value for this index */
- SearchResult = CmpGetValueKeyFromCache(Kcb,
- CellData,
- i,
- CachedValue,
- Value,
- IndexIsCached,
- ValueIsCached,
- CellToRelease);
+ SearchResult = CmpGetValueKeyFromCache(Kcb,
+ CellData,
+ i,
+ CachedValue,
+ Value,
+ IndexIsCached,
+ ValueIsCached,
+ CellToRelease);
if (SearchResult != SearchSuccess)
{
/* We either failed or need the exclusive lock */
@@ -266,7 +266,7 @@
}
/* Check if the both the index and the value are cached */
- if ((IndexIsCached) && (*ValueIsCached))
+ if (IndexIsCached && *ValueIsCached)
{
/* We don't expect this yet */
ASSERT_VALUE_CACHE();
Modified: trunk/reactos/tools/mkhive/binhive.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/binhive.c?rev…
==============================================================================
--- trunk/reactos/tools/mkhive/binhive.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/binhive.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -16,7 +16,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* COPYRIGHT: See COPYING in the top level directory
+/*
+ * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/binhive.c
* PURPOSE: Binary hive export code
Modified: trunk/reactos/tools/mkhive/binhive.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/binhive.h?rev…
==============================================================================
--- trunk/reactos/tools/mkhive/binhive.h [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/binhive.h [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -16,7 +16,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* COPYRIGHT: See COPYING in the top level directory
+/*
+ * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/binhive.h
* PURPOSE: Binary hive export code
Removed: trunk/reactos/tools/mkhive/ntoskrnl.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/ntoskrnl.h?re…
==============================================================================
--- trunk/reactos/tools/mkhive/ntoskrnl.h [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/ntoskrnl.h (removed)
@@ -1,14 +0,0 @@
-/*
- * This header is used together with cmindex.c and cmname.c
- */
-
-#define NDEBUG
-#include "mkhive.h"
-
-PVOID
-NTAPI
-CmpAllocate(
- IN SIZE_T Size,
- IN BOOLEAN Paged,
- IN ULONG Tag
-);
Modified: trunk/reactos/tools/mkhive/reginf.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/reginf.c?rev=…
==============================================================================
--- trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -16,7 +16,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* COPYRIGHT: See COPYING in the top level directory
+/*
+ * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/reginf.c
* PURPOSE: Inf file import code
Modified: trunk/reactos/tools/mkhive/reginf.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/reginf.h?rev=…
==============================================================================
--- trunk/reactos/tools/mkhive/reginf.h [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/reginf.h [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -16,7 +16,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* COPYRIGHT: See COPYING in the top level directory
+/*
+ * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/reginf.h
* PURPOSE: Inf file import code
Modified: trunk/reactos/tools/mkhive/registry.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.h?re…
==============================================================================
--- trunk/reactos/tools/mkhive/registry.h [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.h [iso-8859-1] Sat Jan 16 23:54:45 2016
@@ -1,4 +1,5 @@
-/* COPYRIGHT: See COPYING in the top level directory
+/*
+ * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/registry.h
* PURPOSE: Registry code
@@ -34,23 +35,26 @@
#define ERROR_SUCCESS 0L
#define ERROR_UNSUCCESSFUL 1L
+#define ERROR_FILE_NOT_FOUND 2L
#define ERROR_OUTOFMEMORY 14L
#define ERROR_INVALID_PARAMETER 87L
#define ERROR_MORE_DATA 234L
#define ERROR_NO_MORE_ITEMS 259L
-#define REG_NONE 0
-#define REG_SZ 1
-#define REG_EXPAND_SZ 2
-#define REG_BINARY 3
-#define REG_DWORD 4
-#define REG_DWORD_BIG_ENDIAN 5
-#define REG_DWORD_LITTLE_ENDIAN 4
-#define REG_LINK 6
-#define REG_MULTI_SZ 7
-#define REG_RESOURCE_LIST 8
-#define REG_FULL_RESOURCE_DESCRIPTOR 9
-#define REG_RESOURCE_REQUIREMENTS_LIST 10
+#define REG_NONE 0
+#define REG_SZ 1
+#define REG_EXPAND_SZ 2
+#define REG_BINARY 3
+#define REG_DWORD 4
+#define REG_DWORD_LITTLE_ENDIAN 4
+#define REG_DWORD_BIG_ENDIAN 5
+#define REG_LINK 6
+#define REG_MULTI_SZ 7
+#define REG_RESOURCE_LIST 8
+#define REG_FULL_RESOURCE_DESCRIPTOR 9
+#define REG_RESOURCE_REQUIREMENTS_LIST 10
+#define REG_QWORD 11
+#define REG_QWORD_LITTLE_ENDIAN 11
VOID
RegInitializeRegistry(VOID);