ReactOS  0.4.15-dev-321-g2d9b385
regutil.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Setup Library
4  * FILE: base/setup/lib/regutil.h
5  * PURPOSE: Registry utility functions
6  * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7  */
8 
9 #pragma once
10 
11 /*
12  * This function is similar to the one in dlls/win32/advapi32/reg/reg.c
13  * TODO: I should review both of them very carefully, because they may need
14  * some adjustments in their NtCreateKey calls, especially for CreateOptions
15  * stuff etc...
16  */
22 
23 /*
24  * Should be called under SE_BACKUP_PRIVILEGE privilege
25  */
29  IN PCWSTR RegistryKey,
30  IN BOOLEAN IsHiveNew,
31  IN HANDLE ProtoKeyHandle
32 /*
33  IN PUCHAR Descriptor,
34  IN ULONG DescriptorLength
35 */
36  );
37 
38 /* Adapted from ntoskrnl/config/cmsysini.c:CmpLinkKeyToHive() */
42  IN PCWSTR LinkKeyName,
43  IN PCWSTR TargetKeyName);
44 
48  IN PCWSTR LinkKeyName);
49 
50 /*
51  * Should be called under SE_RESTORE_PRIVILEGE privilege
52  */
56  IN PCWSTR RegMountPoint,
57  // IN HANDLE RootDirectory OPTIONAL,
59  IN PCWSTR RegistryKey
60 /*
61  IN PUCHAR Descriptor,
62  IN ULONG DescriptorLength
63 */
64  );
65 
66 /*
67  * Should be called under SE_RESTORE_PRIVILEGE privilege
68  */
72  IN PCWSTR RegMountPoint,
73  IN ULONG Flags);
74 
75 /*
76  * Should be called under SE_RESTORE_PRIVILEGE privilege
77  */
80  // IN HANDLE RootKey OPTIONAL,
81  // // IN HANDLE RootDirectory OPTIONAL,
83  IN PCWSTR RegistryKey /* ,
84  IN PCWSTR RegMountPoint */);
85 
86 /* EOF */
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
const uint16_t * PCWSTR
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
static PMEMKEY RootKey
Definition: registry.c:55
UNICODE_STRING NtSystemRoot
Definition: init.c:73
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4711
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS CreateSymLinkKey(IN HANDLE RootKey OPTIONAL, IN PCWSTR LinkKeyName, IN PCWSTR TargetKeyName)
Definition: regutil.c:254
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS DisconnectRegistry(IN HANDLE RootKey OPTIONAL, IN PCWSTR RegMountPoint, IN ULONG Flags)
Definition: regutil.c:432
unsigned char BOOLEAN
NTSTATUS ConnectRegistry(IN HANDLE RootKey OPTIONAL, IN PCWSTR RegMountPoint, IN PUNICODE_STRING NtSystemRoot, IN PCWSTR RegistryKey)
Definition: regutil.c:391
NTSTATUS CreateRegistryFile(IN PUNICODE_STRING NtSystemRoot, IN PCWSTR RegistryKey, IN BOOLEAN IsHiveNew, IN HANDLE ProtoKeyHandle)
Definition: regutil.c:140
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG CreateOptions
Definition: fltkernel.h:1230
NTSTATUS DeleteSymLinkKey(IN HANDLE RootKey OPTIONAL, IN PCWSTR LinkKeyName)
Definition: regutil.c:318
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
NTSTATUS VerifyRegistryHive(IN PUNICODE_STRING NtSystemRoot, IN PCWSTR RegistryKey)
Definition: regutil.c:455
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
NTSTATUS CreateNestedKey(PHANDLE KeyHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, ULONG CreateOptions)
Definition: regutil.c:33
unsigned int ULONG
Definition: retypes.h:1
ULONG ACCESS_MASK
Definition: nt_native.h:40
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68