/* INCLUDES *****************************************************************/
-#include <stdio.h>
-
#include "mkhive.h"
+/* FUNCTIONS ****************************************************************/
+
BOOL
ExportBinaryHive(
IN PCSTR FileName,
* Hermès Bélusca-Maïto
*/
+/* INCLUDES *****************************************************************/
+
#define NDEBUG
#include "mkhive.h"
+/* FUNCTIONS ****************************************************************/
+
PVOID
NTAPI
CmpAllocate(
{
*pValueCell = NewValueCell;
*pValueCellOffset = NewValueCellOffset;
+ Status = STATUS_SUCCESS;
}
return Status;
* PROGRAMMER: Hervé Poussineau
*/
+#pragma once
+
#define VERIFY_KEY_CELL(key)
NTSTATUS
* Hermès Bélusca-Maïto
*/
+/* INCLUDES *****************************************************************/
+
#include <limits.h>
#include <string.h>
#include <stdio.h>
#define DIR_SEPARATOR_STRING "\\"
#endif
+/* FUNCTIONS ****************************************************************/
void usage(void)
{
RtlInitUnicodeString(
IN OUT PUNICODE_STRING DestinationString,
IN PCWSTR SourceString);
+
WCHAR NTAPI
RtlUpcaseUnicodeChar(
IN WCHAR Source);
* Hermès Bélusca-Maïto
*/
+/* INCLUDES *****************************************************************/
+
#define NDEBUG
#include "mkhive.h"
+/* DEFINITIONS AND DATA *****************************************************/
+
#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017D)
#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121)
+typedef struct _REPARSE_POINT
+{
+ LIST_ENTRY ListEntry;
+ PCMHIVE SourceHive;
+ HCELL_INDEX SourceKeyCellOffset;
+ PCMHIVE DestinationHive;
+ HCELL_INDEX DestinationKeyCellOffset;
+} REPARSE_POINT, *PREPARSE_POINT;
+
+typedef struct _MEMKEY
+{
+ /* Information on hard disk structure */
+ HCELL_INDEX KeyCellOffset;
+ PCMHIVE RegistryHive;
+} MEMKEY, *PMEMKEY;
+
+#define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
+#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
+
static CMHIVE RootHive;
static PMEMKEY RootKey;
0x01, 0x02, 0x00, 0x00
};
+/* GLOBALS ******************************************************************/
HIVE_LIST_ENTRY RegistryHives[/*MAX_NUMBER_OF_REGISTRY_HIVES*/] =
{
};
C_ASSERT(_countof(RegistryHives) == MAX_NUMBER_OF_REGISTRY_HIVES);
+/* FUNCTIONS ****************************************************************/
static PMEMKEY
CreateInMemoryStructure(
#pragma once
-typedef struct _REPARSE_POINT
-{
- LIST_ENTRY ListEntry;
- PCMHIVE SourceHive;
- HCELL_INDEX SourceKeyCellOffset;
- PCMHIVE DestinationHive;
- HCELL_INDEX DestinationKeyCellOffset;
-} REPARSE_POINT, *PREPARSE_POINT;
-
-typedef struct _MEMKEY
-{
- /* Information on hard disk structure */
- HCELL_INDEX KeyCellOffset;
- PCMHIVE RegistryHive;
-} MEMKEY, *PMEMKEY;
-
-#define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
-#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
-
typedef struct _HIVE_LIST_ENTRY
{
PCSTR HiveName;