[SETUPLIB] Move the files that implement utility functions into their own subdirector...
[reactos.git] / base / setup / lib / utils / regutil.h
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 */
17 NTSTATUS
18 CreateNestedKey(PHANDLE KeyHandle,
19 ACCESS_MASK DesiredAccess,
20 POBJECT_ATTRIBUTES ObjectAttributes,
21 ULONG CreateOptions);
22
23 /*
24 * Should be called under SE_BACKUP_PRIVILEGE privilege
25 */
26 NTSTATUS
27 CreateRegistryFile(
28 IN PUNICODE_STRING InstallPath,
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 BOOLEAN
39 CmpLinkKeyToHive(
40 IN HANDLE RootLinkKeyHandle OPTIONAL,
41 IN PCWSTR LinkKeyName,
42 IN PCWSTR TargetKeyName);
43
44 /*
45 * Should be called under SE_RESTORE_PRIVILEGE privilege
46 */
47 NTSTATUS
48 ConnectRegistry(
49 IN HKEY RootKey OPTIONAL,
50 IN PCWSTR RegMountPoint,
51 // IN HANDLE RootDirectory OPTIONAL,
52 IN PUNICODE_STRING InstallPath,
53 IN PCWSTR RegistryKey
54 /*
55 IN PUCHAR Descriptor,
56 IN ULONG DescriptorLength
57 */
58 );
59
60 /*
61 * Should be called under SE_RESTORE_PRIVILEGE privilege
62 */
63 NTSTATUS
64 DisconnectRegistry(
65 IN HKEY RootKey OPTIONAL,
66 IN PCWSTR RegMountPoint,
67 IN ULONG Flags);
68
69 /*
70 * Should be called under SE_RESTORE_PRIVILEGE privilege
71 */
72 NTSTATUS
73 VerifyRegistryHive(
74 // IN HKEY RootKey OPTIONAL,
75 // // IN HANDLE RootDirectory OPTIONAL,
76 IN PUNICODE_STRING InstallPath,
77 IN PCWSTR RegistryKey /* ,
78 IN PCWSTR RegMountPoint */);
79
80 /* EOF */