mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
Added mapping of access rights
Removed user-mode types svn path=/trunk/; revision=1580
This commit is contained in:
parent
c06ef435fb
commit
17b93d7d9b
5 changed files with 148 additions and 209 deletions
|
@ -1,72 +0,0 @@
|
|||
|
||||
// registry key structures
|
||||
|
||||
|
||||
typedef struct _KEY_BASIC_INFORMATION {
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
ULONG TitleIndex;
|
||||
ULONG NameLength;
|
||||
WCHAR Name[1]; // variable size
|
||||
} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _KEY_NODE_INFORMATION {
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
ULONG TitleIndex;
|
||||
ULONG ClassOffset;
|
||||
ULONG ClassLength;
|
||||
ULONG NameLength;
|
||||
WCHAR Name[1]; // variable size
|
||||
} KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
|
||||
|
||||
typedef struct _KEY_FULL_INFORMATION {
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
ULONG TitleIndex;
|
||||
ULONG ClassOffset;
|
||||
ULONG ClassLength;
|
||||
ULONG SubKeys;
|
||||
ULONG MaxNameLen;
|
||||
ULONG MaxClassLen;
|
||||
ULONG Values;
|
||||
ULONG MaxValueNameLen;
|
||||
ULONG MaxValueDataLen;
|
||||
WCHAR Class[1]; // variable size
|
||||
} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
|
||||
|
||||
|
||||
typedef struct _KEY_WRITE_TIME_INFORMATION {
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
} KEY_WRITE_TIME_INFORMATION, *PKEY_WRITE_TIME_INFORMATION;
|
||||
|
||||
|
||||
// key query value structures
|
||||
|
||||
typedef struct _KEY_VALUE_BASIC_INFORMATION {
|
||||
ULONG TitleIndex;
|
||||
ULONG Type;
|
||||
ULONG NameLength;
|
||||
WCHAR Name[1]; // variable size
|
||||
} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _KEY_VALUE_FULL_INFORMATION {
|
||||
ULONG TitleIndex;
|
||||
ULONG Type;
|
||||
ULONG DataOffset;
|
||||
ULONG DataLength;
|
||||
ULONG NameLength;
|
||||
WCHAR Name[1]; // variable size
|
||||
} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
|
||||
|
||||
typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
|
||||
ULONG TitleIndex;
|
||||
ULONG Type;
|
||||
ULONG DataLength;
|
||||
UCHAR Data[1]; // variable size
|
||||
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
|
||||
|
||||
typedef struct _KEY_VALUE_ENTRY {
|
||||
PUNICODE_STRING ValueName;
|
||||
ULONG DataLength;
|
||||
ULONG DataOffset;
|
||||
ULONG Type;
|
||||
} KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ntddk.h,v 1.17 2001/01/08 02:14:05 dwelch Exp $
|
||||
/* $Id: ntddk.h,v 1.18 2001/01/28 21:36:05 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -27,6 +27,7 @@ extern "C"
|
|||
|
||||
#include <ntos/types.h>
|
||||
#include <ntos/disk.h>
|
||||
#include <ntos/registry.h>
|
||||
#include <napi/types.h>
|
||||
|
||||
#include <pe.h>
|
||||
|
@ -35,7 +36,6 @@ extern "C"
|
|||
#include <ddk/ntdef.h>
|
||||
#include <ddk/defines.h>
|
||||
#include <ddk/types.h>
|
||||
// #include <ddk/cfgtypes.h>
|
||||
#include <ddk/cmtypes.h>
|
||||
#include <ddk/ketypes.h>
|
||||
#include <ntos/security.h>
|
||||
|
|
|
@ -32,8 +32,12 @@
|
|||
#ifndef _GNU_H_WINDOWS32_DEFINES
|
||||
#define _GNU_H_WINDOWS32_DEFINES
|
||||
|
||||
#include <ntos/registry.h>
|
||||
|
||||
#define WINBASEAPI
|
||||
|
||||
|
||||
|
||||
#ifndef WIN32_NO_STATUS
|
||||
//#define STATUS_WAIT_0 (0x00000000L)
|
||||
//#define STATUS_ABANDONED_WAIT_0 (0x00000080L)
|
||||
|
@ -44,19 +48,6 @@
|
|||
|
||||
|
||||
|
||||
/* DuplicateHandle, MapViewOfFile */
|
||||
#define KEY_ALL_ACCESS (0xf003fL)
|
||||
#define KEY_CREATE_LINK (32)
|
||||
#define KEY_CREATE_SUB_KEY (4)
|
||||
#define KEY_ENUMERATE_SUB_KEYS (8)
|
||||
#define KEY_EXECUTE (0x20019L)
|
||||
#define KEY_NOTIFY (16)
|
||||
#define KEY_QUERY_VALUE (1)
|
||||
#define KEY_READ (0x20019L)
|
||||
#define KEY_SET_VALUE (2)
|
||||
#define KEY_WRITE (0x20006L)
|
||||
|
||||
|
||||
/* CreateFile, GetFileAttributes, SetFileAttributes */
|
||||
|
||||
#define SECURITY_ANONYMOUS (0)
|
||||
|
@ -2106,18 +2097,6 @@ extern "C" {
|
|||
/* NetUserEnum */
|
||||
|
||||
/* OpenProcessToken */
|
||||
#define TOKEN_ADJUST_DEFAULT (128)
|
||||
#define TOKEN_ADJUST_GROUPS (64)
|
||||
#define TOKEN_ADJUST_PRIVILEGES (32)
|
||||
#define TOKEN_ALL_ACCESS (0xf00ffL)
|
||||
#define TOKEN_ASSIGN_PRIMARY (1)
|
||||
#define TOKEN_DUPLICATE (2)
|
||||
#define TOKEN_EXECUTE (0x20000L)
|
||||
#define TOKEN_IMPERSONATE (4)
|
||||
#define TOKEN_QUERY (8)
|
||||
#define TOKEN_QUERY_SOURCE (16)
|
||||
#define TOKEN_READ (0x20008L)
|
||||
#define TOKEN_WRITE (0x200e0L)
|
||||
|
||||
/* OpenSCManager */
|
||||
#define SC_MANAGER_ALL_ACCESS (0xf003fL)
|
||||
|
@ -2194,10 +2173,6 @@ extern "C" {
|
|||
#define HKEY_DYN_DATA ((HKEY)0x00000006)
|
||||
|
||||
/* RegCreateKeyEx */
|
||||
#define REG_OPTION_VOLATILE (0x1L)
|
||||
#define REG_OPTION_NON_VOLATILE (0L)
|
||||
#define REG_CREATED_NEW_KEY (0x1L)
|
||||
#define REG_OPENED_EXISTING_KEY (0x2L)
|
||||
|
||||
/* RegEnumValue */
|
||||
#define REG_BINARY (3)
|
||||
|
@ -2405,7 +2380,6 @@ extern "C" {
|
|||
#define CAL_SSHORTDATE (5)
|
||||
|
||||
/* SetProcessWorkingSetSize */
|
||||
#define PROCESS_SET_QUOTA (256)
|
||||
|
||||
/* SetPrinter */
|
||||
|
||||
|
|
37
reactos/include/ntos/registry.h
Normal file
37
reactos/include/ntos/registry.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/* $Id: registry.h,v 1.1 2001/01/28 21:32:37 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: include/ntos/registry.h
|
||||
* PURPOSE: Registry declarations used by all the parts of the
|
||||
* system
|
||||
* PROGRAMMER: Eric Kohl <ekohl@rz-online.de>
|
||||
* UPDATE HISTORY:
|
||||
* 25/01/2001: Created
|
||||
*/
|
||||
|
||||
#ifndef __INCLUDE_REGISTRY_H
|
||||
#define __INCLUDE_REGISTRY_H
|
||||
|
||||
/* Key access rights */
|
||||
#define KEY_QUERY_VALUE (1)
|
||||
#define KEY_SET_VALUE (2)
|
||||
#define KEY_CREATE_SUB_KEY (4)
|
||||
#define KEY_ENUMERATE_SUB_KEYS (8)
|
||||
#define KEY_NOTIFY (16)
|
||||
#define KEY_CREATE_LINK (32)
|
||||
|
||||
#define KEY_READ (0x20019L)
|
||||
#define KEY_WRITE (0x20006L)
|
||||
#define KEY_EXECUTE (0x20019L)
|
||||
#define KEY_ALL_ACCESS (0xf003fL)
|
||||
|
||||
|
||||
/* RegCreateKeyEx */
|
||||
#define REG_OPTION_VOLATILE (0x1L)
|
||||
#define REG_OPTION_NON_VOLATILE (0L)
|
||||
#define REG_CREATED_NEW_KEY (0x1L)
|
||||
#define REG_OPENED_EXISTING_KEY (0x2L)
|
||||
|
||||
|
||||
#endif /* __INCLUDE_REGISTRY_H */
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: registry.c,v 1.52 2000/12/01 12:44:15 jean Exp $
|
||||
/* $Id: registry.c,v 1.53 2001/01/28 21:37:37 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -11,19 +11,15 @@
|
|||
* Created 22/05/98
|
||||
*/
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <defines.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* ----------------------------------------------------- Typedefs */
|
||||
|
||||
//#define LONG_MAX 0x7fffffff
|
||||
|
||||
#define REG_BLOCK_SIZE 4096
|
||||
#define REG_HEAP_BLOCK_DATA_OFFSET 32
|
||||
#define REG_HEAP_ID 0x6e696268
|
||||
|
@ -60,30 +56,30 @@ typedef DWORD BLOCK_OFFSET;
|
|||
/* header for registry hive file : */
|
||||
typedef struct _HEADER_BLOCK
|
||||
{
|
||||
DWORD BlockId; /* ="regf" */
|
||||
DWORD Version; /* file version ?*/
|
||||
DWORD VersionOld; /* file version ?*/
|
||||
FILETIME DateModified;
|
||||
DWORD Unused3; /* registry format version ? */
|
||||
DWORD Unused4; /* registry format version ? */
|
||||
DWORD Unused5; /* registry format version ? */
|
||||
DWORD Unused6; /* registry format version ? */
|
||||
ULONG BlockId; /* ="regf" */
|
||||
ULONG Version; /* file version ?*/
|
||||
ULONG VersionOld; /* file version ?*/
|
||||
LARGE_INTEGER DateModified;
|
||||
ULONG Unused3; /* registry format version ? */
|
||||
ULONG Unused4; /* registry format version ? */
|
||||
ULONG Unused5; /* registry format version ? */
|
||||
ULONG Unused6; /* registry format version ? */
|
||||
BLOCK_OFFSET RootKeyBlock;
|
||||
DWORD BlockSize;
|
||||
DWORD Unused7;
|
||||
ULONG BlockSize;
|
||||
ULONG Unused7;
|
||||
WCHAR FileName[64]; /* end of file name */
|
||||
DWORD Unused8[83];
|
||||
DWORD Checksum;
|
||||
ULONG Unused8[83];
|
||||
ULONG Checksum;
|
||||
} HEADER_BLOCK, *PHEADER_BLOCK;
|
||||
|
||||
typedef struct _HEAP_BLOCK
|
||||
{
|
||||
DWORD BlockId; /* = "hbin" */
|
||||
ULONG BlockId; /* = "hbin" */
|
||||
BLOCK_OFFSET BlockOffset; /* block offset of this heap */
|
||||
DWORD BlockSize; /* size in bytes, 4k multiple */
|
||||
DWORD Unused1;
|
||||
FILETIME DateModified;
|
||||
DWORD Unused2;
|
||||
ULONG BlockSize; /* size in bytes, 4k multiple */
|
||||
ULONG Unused1;
|
||||
LARGE_INTEGER DateModified;
|
||||
ULONG Unused2;
|
||||
} HEAP_BLOCK, *PHEAP_BLOCK;
|
||||
|
||||
// each sub_block begin with this struct :
|
||||
|
@ -96,22 +92,22 @@ typedef struct _FREE_SUB_BLOCK
|
|||
typedef struct _KEY_BLOCK
|
||||
{
|
||||
LONG SubBlockSize;
|
||||
WORD SubBlockId;
|
||||
WORD Type;
|
||||
FILETIME LastWriteTime;
|
||||
DWORD UnUsed1;
|
||||
USHORT SubBlockId;
|
||||
USHORT Type;
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
ULONG UnUsed1;
|
||||
BLOCK_OFFSET ParentKeyOffset;
|
||||
DWORD NumberOfSubKeys;
|
||||
DWORD UnUsed2;
|
||||
ULONG NumberOfSubKeys;
|
||||
ULONG UnUsed2;
|
||||
BLOCK_OFFSET HashTableOffset;
|
||||
DWORD UnUsed3;
|
||||
DWORD NumberOfValues;
|
||||
ULONG UnUsed3;
|
||||
ULONG NumberOfValues;
|
||||
BLOCK_OFFSET ValuesOffset;
|
||||
BLOCK_OFFSET SecurityKeyOffset;
|
||||
BLOCK_OFFSET ClassNameOffset;
|
||||
DWORD Unused4[5];
|
||||
WORD NameSize;
|
||||
WORD ClassSize; /* size of ClassName in bytes */
|
||||
ULONG Unused4[5];
|
||||
USHORT NameSize;
|
||||
USHORT ClassSize; /* size of ClassName in bytes */
|
||||
UCHAR Name[0]; /* warning : not zero terminated */
|
||||
} KEY_BLOCK, *PKEY_BLOCK;
|
||||
|
||||
|
@ -126,8 +122,8 @@ typedef struct _HASH_RECORD
|
|||
typedef struct _HASH_TABLE_BLOCK
|
||||
{
|
||||
LONG SubBlockSize;
|
||||
WORD SubBlockId;
|
||||
WORD HashTableSize;
|
||||
USHORT SubBlockId;
|
||||
USHORT HashTableSize;
|
||||
HASH_RECORD Table[0];
|
||||
} HASH_TABLE_BLOCK, *PHASH_TABLE_BLOCK;
|
||||
|
||||
|
@ -140,13 +136,13 @@ typedef struct _VALUE_LIST_BLOCK
|
|||
typedef struct _VALUE_BLOCK
|
||||
{
|
||||
LONG SubBlockSize;
|
||||
WORD SubBlockId; // "kv"
|
||||
WORD NameSize; // length of Name
|
||||
USHORT SubBlockId; // "kv"
|
||||
USHORT NameSize; // length of Name
|
||||
LONG DataSize; // length of datas in the subblock pointed by DataOffset
|
||||
BLOCK_OFFSET DataOffset;// datas are here if high bit of DataSize is set
|
||||
DWORD DataType;
|
||||
WORD Flags;
|
||||
WORD Unused1;
|
||||
ULONG DataType;
|
||||
USHORT Flags;
|
||||
USHORT Unused1;
|
||||
UCHAR Name[0]; /* warning : not zero terminated */
|
||||
} VALUE_BLOCK, *PVALUE_BLOCK;
|
||||
|
||||
|
@ -159,7 +155,7 @@ typedef struct _DATA_BLOCK
|
|||
typedef struct _REGISTRY_FILE
|
||||
{
|
||||
PWSTR Filename;
|
||||
DWORD FileSize;
|
||||
ULONG FileSize;
|
||||
PFILE_OBJECT FileObject;
|
||||
PHEADER_BLOCK HeaderBlock;
|
||||
// ULONG NumberOfBlocks;
|
||||
|
@ -184,14 +180,14 @@ typedef struct _KEY_OBJECT
|
|||
CSHORT Size;
|
||||
|
||||
ULONG Flags;
|
||||
WORD NameSize; // length of Name
|
||||
USHORT NameSize; // length of Name
|
||||
UCHAR *Name;
|
||||
PREGISTRY_FILE RegistryFile;
|
||||
BLOCK_OFFSET BlockOffset;
|
||||
PKEY_BLOCK KeyBlock;
|
||||
struct _KEY_OBJECT *ParentKey;
|
||||
DWORD NumberOfSubKeys; /* subkeys loaded in SubKeys */
|
||||
DWORD SizeOfSubKeys; /* space allocated in SubKeys */
|
||||
ULONG NumberOfSubKeys; /* subkeys loaded in SubKeys */
|
||||
ULONG SizeOfSubKeys; /* space allocated in SubKeys */
|
||||
struct _KEY_OBJECT **SubKeys; /* list of subkeys loaded */
|
||||
} KEY_OBJECT, *PKEY_OBJECT;
|
||||
|
||||
|
@ -205,6 +201,9 @@ static PKEY_OBJECT CmiMachineKey = NULL;
|
|||
static PKEY_OBJECT CmiUserKey = NULL;
|
||||
static KSPIN_LOCK CmiKeyListLock;
|
||||
|
||||
static GENERIC_MAPPING CmiKeyMapping =
|
||||
{KEY_READ, KEY_WRITE, KEY_EXECUTE, KEY_ALL_ACCESS};
|
||||
|
||||
/* ----------------------------------------- Forward Declarations */
|
||||
|
||||
|
||||
|
@ -322,6 +321,7 @@ CmInitializeRegistry(VOID)
|
|||
CmiKeyType->MaxHandles = LONG_MAX;
|
||||
CmiKeyType->PagedPoolCharge = 0;
|
||||
CmiKeyType->NonpagedPoolCharge = sizeof(KEY_OBJECT);
|
||||
CmiKeyType->Mapping = &CmiKeyMapping;
|
||||
CmiKeyType->Dump = NULL;
|
||||
CmiKeyType->Open = NULL;
|
||||
CmiKeyType->Close = NULL;
|
||||
|
@ -776,8 +776,8 @@ NtEnumerateKey (
|
|||
{
|
||||
/* Fill buffer with requested info */
|
||||
BasicInformation = (PKEY_BASIC_INFORMATION) KeyInformation;
|
||||
BasicInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.dwLowDateTime;
|
||||
BasicInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.dwHighDateTime;
|
||||
BasicInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.u.LowPart;
|
||||
BasicInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.u.HighPart;
|
||||
BasicInformation->TitleIndex = Index;
|
||||
BasicInformation->NameLength = (SubKeyBlock->NameSize ) * sizeof(WCHAR);
|
||||
mbstowcs(BasicInformation->Name,
|
||||
|
@ -801,8 +801,8 @@ NtEnumerateKey (
|
|||
{
|
||||
/* Fill buffer with requested info */
|
||||
NodeInformation = (PKEY_NODE_INFORMATION) KeyInformation;
|
||||
NodeInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.dwLowDateTime;
|
||||
NodeInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.dwHighDateTime;
|
||||
NodeInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.u.LowPart;
|
||||
NodeInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.u.HighPart;
|
||||
NodeInformation->TitleIndex = Index;
|
||||
NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) +
|
||||
SubKeyBlock->NameSize * sizeof(WCHAR);
|
||||
|
@ -838,8 +838,8 @@ NtEnumerateKey (
|
|||
{
|
||||
/* fill buffer with requested info */
|
||||
FullInformation = (PKEY_FULL_INFORMATION) KeyInformation;
|
||||
FullInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.dwLowDateTime;
|
||||
FullInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.dwHighDateTime;
|
||||
FullInformation->LastWriteTime.u.LowPart = SubKeyBlock->LastWriteTime.u.LowPart;
|
||||
FullInformation->LastWriteTime.u.HighPart = SubKeyBlock->LastWriteTime.u.HighPart;
|
||||
FullInformation->TitleIndex = Index;
|
||||
FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) -
|
||||
sizeof(WCHAR);
|
||||
|
@ -1126,12 +1126,12 @@ END FIXME*/
|
|||
fileOffset.u.HighPart = 0;
|
||||
for (i=0; i < RegistryFile->BlockListSize ; i++)
|
||||
{
|
||||
if( RegistryFile->BlockList[i]->DateModified.dwHighDateTime
|
||||
> RegistryFile->HeaderBlock->DateModified.dwHighDateTime
|
||||
||( RegistryFile->BlockList[i]->DateModified.dwHighDateTime
|
||||
== RegistryFile->HeaderBlock->DateModified.dwHighDateTime
|
||||
&& RegistryFile->BlockList[i]->DateModified.dwLowDateTime
|
||||
> RegistryFile->HeaderBlock->DateModified.dwLowDateTime)
|
||||
if( RegistryFile->BlockList[i]->DateModified.u.HighPart
|
||||
> RegistryFile->HeaderBlock->DateModified.u.HighPart
|
||||
||( RegistryFile->BlockList[i]->DateModified.u.HighPart
|
||||
== RegistryFile->HeaderBlock->DateModified.u.HighPart
|
||||
&& RegistryFile->BlockList[i]->DateModified.u.LowPart
|
||||
> RegistryFile->HeaderBlock->DateModified.u.LowPart)
|
||||
)
|
||||
{
|
||||
fileOffset.u.LowPart = RegistryFile->BlockList[i]->BlockOffset+4096;
|
||||
|
@ -1284,8 +1284,8 @@ NtQueryKey (
|
|||
{
|
||||
/* Fill buffer with requested info */
|
||||
BasicInformation = (PKEY_BASIC_INFORMATION) KeyInformation;
|
||||
BasicInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.dwLowDateTime;
|
||||
BasicInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.dwHighDateTime;
|
||||
BasicInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.u.LowPart;
|
||||
BasicInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.u.HighPart;
|
||||
BasicInformation->TitleIndex = 0;
|
||||
BasicInformation->NameLength =
|
||||
(KeyObject->NameSize ) * sizeof(WCHAR);
|
||||
|
@ -1309,8 +1309,8 @@ NtQueryKey (
|
|||
{
|
||||
/* Fill buffer with requested info */
|
||||
NodeInformation = (PKEY_NODE_INFORMATION) KeyInformation;
|
||||
NodeInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.dwLowDateTime;
|
||||
NodeInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.dwHighDateTime;
|
||||
NodeInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.u.LowPart;
|
||||
NodeInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.u.HighPart;
|
||||
NodeInformation->TitleIndex = 0;
|
||||
NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) +
|
||||
KeyObject->NameSize * sizeof(WCHAR);
|
||||
|
@ -1346,8 +1346,8 @@ NtQueryKey (
|
|||
{
|
||||
/* Fill buffer with requested info */
|
||||
FullInformation = (PKEY_FULL_INFORMATION) KeyInformation;
|
||||
FullInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.dwLowDateTime;
|
||||
FullInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.dwHighDateTime;
|
||||
FullInformation->LastWriteTime.u.LowPart = KeyBlock->LastWriteTime.u.LowPart;
|
||||
FullInformation->LastWriteTime.u.HighPart = KeyBlock->LastWriteTime.u.HighPart;
|
||||
FullInformation->TitleIndex = 0;
|
||||
FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) -
|
||||
sizeof(WCHAR);
|
||||
|
@ -2415,8 +2415,8 @@ CmiCreateRegistry(PWSTR Filename)
|
|||
ExAllocatePool(NonPagedPool, sizeof(HEADER_BLOCK));
|
||||
RtlZeroMemory(RegistryFile->HeaderBlock, sizeof(HEADER_BLOCK));
|
||||
RegistryFile->HeaderBlock->BlockId = 0x66676572;
|
||||
RegistryFile->HeaderBlock->DateModified.dwLowDateTime = 0;
|
||||
RegistryFile->HeaderBlock->DateModified.dwHighDateTime = 0;
|
||||
RegistryFile->HeaderBlock->DateModified.u.LowPart = 0;
|
||||
RegistryFile->HeaderBlock->DateModified.u.HighPart = 0;
|
||||
RegistryFile->HeaderBlock->Version = 1;
|
||||
RegistryFile->HeaderBlock->Unused3 = 3;
|
||||
RegistryFile->HeaderBlock->Unused5 = 1;
|
||||
|
|
Loading…
Reference in a new issue