30 ULONG ParentNameSize, LinkNameSize;
36 RootCell = Hive->Hive.BaseBlock->RootCell;
37 RootData =
HvGetCell(&Hive->Hive, RootCell);
38 if (!RootData)
return FALSE;
49 if (!LinkData)
return FALSE;
51 if (!ParentData)
return FALSE;
76 NameSize = RegistryName.
Length + ParentNameSize +
sizeof(
WCHAR) + LinkNameSize;
80 if (!HiveName->Buffer)
82 DPRINT1(
"CmpGetHiveName: Unable to allocate memory\n");
87 HiveName->Length = HiveName->MaximumLength = (
USHORT)NameSize;
106 p += ParentNameSize /
sizeof(
WCHAR);
159 DPRINT1(
"CmpAddToHiveFileList: Failed to create or open the hive list (Status: 0x%08lx)\n",
Status);
169 DPRINT1(
"CmpAddToHiveFileList: Unable to retrieve the hive path\n");
182 sizeof(DummyNameInfo),
186 DPRINT1(
"CmpAddToHiveFileList: Hive file name size query failed (Status: 0x%08lx)\n",
Status);
215 DPRINT1(
"CmpAddToHiveFileList: Hive file name query failed (Status: 0x%08lx)\n",
Status);
235 DPRINT1(
"CmpAddToHiveFileList: Failed to add an entry in the hive list (Status: 0x%08lx)\n",
Status);
239 Hive->HiveRootPath = HivePath;
263 if (Hive->HiveRootPath.Buffer ==
NULL)
277 DPRINT1(
"CmpRemoveFromHiveFileList: Failed to open the hive list (Status: 0x%08lx)\n",
Status);
286 RtlInitEmptyUnicodeString(&Hive->HiveRootPath,
NULL, 0);
#define OBJ_NAME_PATH_SEPARATOR
static UNICODE_STRING HiveListKeyName
static BOOLEAN CmpGetHiveName(_In_ PCMHIVE Hive, _Out_ PUNICODE_STRING HiveName)
NTSTATUS NTAPI CmpAddToHiveFileList(_Inout_ PCMHIVE Hive)
VOID NTAPI CmpRemoveFromHiveFileList(_Inout_ PCMHIVE Hive)
#define HvReleaseCell(Hive, Cell)
VOID NTAPI CmpCopyCompressedName(OUT PWCHAR Destination, IN ULONG DestinationLength, IN PWCHAR Source, IN ULONG SourceLength)
USHORT NTAPI CmpCompressedNameSize(IN PWCHAR Name, IN ULONG Length)
#define HvGetCell(Hive, Cell)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define RTL_CONSTANT_STRING(s)
#define ExAllocatePoolWithTag(hernya, size, tag)
NTSYSAPI NTSTATUS NTAPI ZwDeleteValueKey(__in IN HANDLE Key, __in IN PUNICODE_STRING ValueName)
#define HFILE_TYPE_PRIMARY
#define ExFreePoolWithTag(_P, _T)
#define InitializeObjectAttributes(p, n, a, r, s)
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
#define REG_OPTION_VOLATILE
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define STATUS_BUFFER_OVERFLOW
union _CELL_DATA::@5243 u
WCHAR Name[ANYSIZE_ARRAY]
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INSUFFICIENT_RESOURCES