ReactOS  0.4.15-dev-5126-g3bb451b
cm.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: ntoskrnl/include/internal/cm.h
5  * PURPOSE: Internal header for the Configuration Manager
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 #pragma once
10 
11 #include <cmlib.h>
12 #include <cmreslist.h>
13 #include "cmboot.h"
14 
15 //
16 // Define this if you want debugging support
17 //
18 #define _CM_DEBUG_ 0x00
19 
20 //
21 // These define the Debug Masks Supported
22 //
23 #define CM_HANDLE_DEBUG 0x01
24 #define CM_NAMESPACE_DEBUG 0x02
25 #define CM_SECURITY_DEBUG 0x04
26 #define CM_REFERENCE_DEBUG 0x08
27 #define CM_CALLBACK_DEBUG 0x10
28 
29 //
30 // Debug/Tracing support
31 //
32 #if _CM_DEBUG_
33 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
34 #define CMTRACE DbgPrintEx
35 #else
36 #define CMTRACE(x, ...) \
37  if (x & CmpTraceLevel) DbgPrint(__VA_ARGS__)
38 #endif
39 #else
40 #define CMTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
41 #endif
42 
43 //
44 // CM_KEY_CONTROL_BLOCK Signatures
45 //
46 #define CM_KCB_SIGNATURE 'bKmC'
47 #define CM_KCB_INVALID_SIGNATURE '4FmC'
48 
49 //
50 // CM_KEY_CONTROL_BLOCK ExtFlags
51 //
52 #define CM_KCB_NO_SUBKEY 0x01
53 #define CM_KCB_SUBKEY_ONE 0x02
54 #define CM_KCB_SUBKEY_HINT 0x04
55 #define CM_KCB_SYM_LINK_FOUND 0x08
56 #define CM_KCB_KEY_NON_EXIST 0x10
57 #define CM_KCB_NO_DELAY_CLOSE 0x20
58 #define CM_KCB_INVALID_CACHED_INFO 0x40
59 #define CM_KCB_READ_ONLY_KEY 0x80
60 
61 //
62 // CM_KEY_BODY Types
63 //
64 #define CM_KEY_BODY_TYPE 0x6B793032 // 'ky02'
65 
66 //
67 // Number of various lists and hashes
68 //
69 #if 0 // See sdk/lib/cmlib/cmlib.h
70 #define CMP_SECURITY_HASH_LISTS 64
71 #endif
72 #define CMP_MAX_CALLBACKS 100
73 
74 //
75 // Hashing Constants
76 //
77 #define CMP_HASH_IRRATIONAL 314159269
78 #define CMP_HASH_PRIME 1000000007
79 
80 //
81 // CmpCreateKeyControlBlock Flags
82 //
83 #define CMP_CREATE_FAKE_KCB 0x1
84 #define CMP_LOCK_HASHES_FOR_KCB 0x2
85 
86 //
87 // CmpDoCreate and CmpDoOpen flags
88 //
89 #define CMP_CREATE_KCB_KCB_LOCKED 0x2
90 #define CMP_OPEN_KCB_NO_CREATE 0x4
91 
92 //
93 // EnlistKeyBodyWithKCB Flags
94 //
95 #define CMP_ENLIST_KCB_LOCKED_SHARED 0x1
96 #define CMP_ENLIST_KCB_LOCKED_EXCLUSIVE 0x2
97 
98 //
99 // Unload Flags
100 //
101 #define CMP_UNLOCK_KCB_LOCKED 0x1
102 #define CMP_UNLOCK_REGISTRY_LOCKED 0x2
103 
104 //
105 // Maximum size of Value Cache
106 //
107 #define MAXIMUM_CACHED_DATA (2 * PAGE_SIZE)
108 
109 //
110 // Hives to load on startup
111 //
112 #define CM_NUMBER_OF_MACHINE_HIVES 6
113 
114 //
115 // Number of items that can fit inside an Allocation Page
116 //
117 #define CM_KCBS_PER_PAGE \
118  ((PAGE_SIZE - FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage)) / sizeof(CM_KEY_CONTROL_BLOCK))
119 #define CM_DELAYS_PER_PAGE \
120  ((PAGE_SIZE - FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage)) / sizeof(CM_DELAY_ALLOC))
121 
122 //
123 // Value Search Results
124 //
126 {
131 
132 //
133 // Key Hash
134 //
135 typedef struct _CM_KEY_HASH
136 {
142 
143 //
144 // Key Hash Table Entry
145 //
147 {
152 
153 //
154 // Name Hash
155 //
156 typedef struct _CM_NAME_HASH
157 {
163 
164 //
165 // Name Hash Table Entry
166 //
168 {
172 
173 //
174 // Key Security Cache
175 //
177 {
184 
185 //
186 // Key Security Cache Entry
187 //
189 {
193 
194 //
195 // Cached Child List
196 //
197 typedef struct _CACHED_CHILD_LIST
198 {
200  union
201  {
204  };
206 
207 //
208 // Index Hint Block
209 //
210 typedef struct _CM_INDEX_HINT_BLOCK
211 {
215 
216 //
217 // Key Body
218 //
219 typedef struct _CM_KEY_BODY
220 {
227 
228 //
229 // Name Control Block (NCB)
230 //
232 {
235  union
236  {
238  struct
239  {
244  };
245  };
247 
248 //
249 // Key Control Block (KCB)
250 //
251 typedef struct _CM_KEY_CONTROL_BLOCK
252 {
255  struct
256  {
262  };
263  union
264  {
266  struct
267  {
272  };
273  };
278  union
279  {
283  };
284  union
285  {
288  };
295  struct
296  {
300  ULONG Flags : 16;
301  };
304 
305 //
306 // Notify Block
307 //
308 typedef struct _CM_NOTIFY_BLOCK
309 {
318 
319 //
320 // Re-map Block
321 //
322 typedef struct _CM_CELL_REMAP_BLOCK
323 {
327 
328 //
329 // Allocation Page
330 //
331 typedef struct _CM_ALLOC_PAGE
332 {
337 
338 //
339 // Allocation Page Entry
340 //
341 typedef struct _CM_DELAY_ALLOC
342 {
346 
347 //
348 // Delayed Close Entry
349 //
351 {
355 
356 //
357 // Delayed KCB Dereference Entry
358 //
360 {
364 
365 //
366 // Cached Value Index
367 //
369 {
371  union
372  {
375  } Data;
377 
378 //
379 // Cached Value
380 //
381 typedef struct _CM_CACHED_VALUE
382 {
388 
389 //
390 // Hive List Entry
391 //
392 typedef struct _HIVE_LIST_ENTRY
393 {
404 
405 //
406 // Parse context for Key Object
407 //
408 typedef struct _CM_PARSE_CONTEXT
409 {
420 
421 //
422 // MultiFunction Adapter Recognizer Structure
423 //
424 typedef struct _CMP_MF_TYPE
425 {
430 
431 //
432 // System Control Vector
433 //
435 {
442 
443 //
444 // Structure for CmpQueryValueDataFromCache
445 //
447 {
448  union
449  {
454  };
456 
457 typedef struct _KEY_INFORMATION
458 {
459  union
460  {
464  };
466 
468 //
469 // BUGBUG Old Hive Stuff for Temporary Support
470 //
473 
474 //
475 // Mapped View Hive Functions
476 //
477 VOID
478 NTAPI
480  IN PCMHIVE Hive
481 );
482 
483 VOID
484 NTAPI
486  IN PCMHIVE Hive
487 );
488 
489 //
490 // Security Cache Functions
491 //
492 VOID
493 NTAPI
495  IN PCMHIVE Hive
496 );
497 
498 VOID
499 NTAPI
501  IN PCMHIVE Hive
502 );
503 
504 //
505 // Value Cache Functions
506 //
508 NTAPI
512  OUT PCM_CACHED_VALUE **CachedValue,
513  OUT ULONG *Index,
515  OUT BOOLEAN *ValueIsCached,
516  OUT PHCELL_INDEX CellToRelease
517 );
518 
520 NTAPI
523  IN PCM_CACHED_VALUE *CachedValue,
524  IN PCM_KEY_VALUE ValueKey,
525  IN BOOLEAN ValueIsCached,
527  IN PVOID KeyValueInformation,
528  IN ULONG Length,
531 );
532 
534 NTAPI
537  OUT PCELL_DATA *CellData,
538  OUT BOOLEAN *IndexIsCached,
539  OUT PHCELL_INDEX ValueListToRelease
540 );
541 
543 NTAPI
546  IN PCELL_DATA CellData,
547  IN ULONG Index,
548  OUT PCM_CACHED_VALUE **CachedValue,
550  IN BOOLEAN IndexIsCached,
551  OUT BOOLEAN *ValueIsCached,
552  OUT PHCELL_INDEX CellToRelease
553 );
554 
556 NTAPI
560  IN ULONG Type,
561  IN PVOID Data,
563 );
564 
565 //
566 // Registry Validation Functions
567 //
568 ULONG
569 NTAPI
571  IN PCMHIVE Hive,
572  IN ULONG Flags
573 );
574 
575 //
576 // Hive List Routines
577 //
578 BOOLEAN
579 NTAPI
581  IN PCMHIVE Hive,
582  OUT PUNICODE_STRING HiveName
583 );
584 
585 NTSTATUS
586 NTAPI
588  IN PCMHIVE Hive
589 );
590 
591 VOID
592 NTAPI
594  IN PCMHIVE Hive
595 );
596 
597 //
598 // Quota Routines
599 //
600 VOID
601 NTAPI
603  VOID
604 );
605 
606 //
607 // Notification Routines
608 //
609 VOID
610 NTAPI
613  IN PHHIVE Hive,
614  IN HCELL_INDEX Cell,
615  IN ULONG Filter
616 );
617 
618 VOID
619 NTAPI
621  IN PCM_KEY_BODY KeyBody,
622  IN BOOLEAN LockHeld
623 );
624 
625 CODE_SEG("INIT")
626 VOID
627 NTAPI
629  VOID
630 );
631 
632 //
633 // KCB Cache/Delay Routines
634 //
635 CODE_SEG("INIT")
636 VOID
637 NTAPI
639  VOID
640 );
641 
642 CODE_SEG("INIT")
643 VOID
644 NTAPI
646  VOID
647 );
648 
649 CODE_SEG("INIT")
650 VOID
651 NTAPI
653  VOID
654 );
655 
656 CODE_SEG("INIT")
657 VOID
658 NTAPI
660  VOID
661 );
662 
663 //
664 // Key Object Routines
665 //
666 VOID
667 NTAPI
670  IN PVOID Object,
673  IN ULONG SystemHandleCount
674 );
675 
676 VOID
677 NTAPI
679  IN PVOID Object
680 );
681 
682 NTSTATUS
683 NTAPI
685  IN PVOID ParseObject,
690  IN OUT PUNICODE_STRING CompleteName,
694  OUT PVOID *Object
695 );
696 
697 NTSTATUS
698 NTAPI
700  IN PVOID Object,
701  IN SECURITY_OPERATION_CODE OperationType,
704  IN OUT PULONG CapturedLength,
705  IN OUT PSECURITY_DESCRIPTOR *ObjectSecurityDescriptor,
708 );
709 
710 NTSTATUS
711 NTAPI
713  IN PVOID Object,
714  IN BOOLEAN HasObjectName,
715  OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
716  IN ULONG Length,
719 );
720 
721 //
722 // Hive Routines
723 //
724 NTSTATUS
725 NTAPI
727  OUT PCMHIVE *CmHive,
728  IN ULONG OperationType,
729  IN ULONG HiveFlags,
730  IN ULONG FileType,
731  IN PVOID HiveData OPTIONAL,
732  IN HANDLE Primary,
733  IN HANDLE Log,
736  IN ULONG CheckFlags
737 );
738 
739 NTSTATUS
740 NTAPI
742  IN PCMHIVE CmHive
743 );
744 
746 NTAPI
748  VOID
749 );
750 
751 NTSTATUS
752 NTAPI
754  IN PUNICODE_STRING LinkName,
756  IN PCMHIVE CmHive,
759 );
760 
761 NTSTATUS
762 NTAPI
764  IN PCUNICODE_STRING BaseName,
766  OUT PHANDLE Primary,
767  OUT PHANDLE Log,
768  OUT PULONG PrimaryDisposition,
769  OUT PULONG LogDisposition,
770  IN BOOLEAN CreateAllowed,
771  IN BOOLEAN MarkAsSystemHive,
772  IN BOOLEAN NoBuffering,
774 );
775 
776 VOID
777 NTAPI
779  IN PCMHIVE Hive
780 );
781 
782 NTSTATUS
783 NTAPI
785  IN PCUNICODE_STRING HiveName,
786  IN ULONG HiveFlags,
787  OUT PCMHIVE *Hive,
788  IN OUT PBOOLEAN New,
789  IN ULONG CheckFlags
790 );
791 
792 VOID
793 NTAPI
795  VOID
796 );
797 
798 //
799 // Registry Utility Functions
800 //
801 BOOLEAN
802 NTAPI
804  VOID
805 );
806 
807 BOOLEAN
808 NTAPI
810  VOID
811 );
812 
813 VOID
814 NTAPI
816  VOID
817 );
818 
819 VOID
820 NTAPI
822  VOID
823 );
824 
825 VOID
826 NTAPI
828  VOID
829 );
830 
831 VOID
832 NTAPI
834  IN PCMHIVE Hive
835 );
836 
837 VOID
838 NTAPI
840  IN PCMHIVE Hive
841 );
842 
843 BOOLEAN
844 NTAPI
846  IN PCMHIVE Hive
847 );
848 
849 BOOLEAN
850 NTAPI
852  IN PCMHIVE Hive
853 );
854 
855 VOID
856 NTAPI
858  IN PCMHIVE Hive
859 );
860 
861 //
862 // Delay Functions
863 //
864 PVOID
865 NTAPI
867  VOID
868 );
869 
870 VOID
871 NTAPI
873  PVOID Entry
874 );
875 
876 VOID
877 NTAPI
880 );
881 
882 VOID
883 NTAPI
886  IN BOOLEAN LockHeldExclusively
887 );
888 
889 VOID
890 NTAPI
892  VOID
893 );
894 
895 VOID
896 NTAPI
898 
899 CODE_SEG("INIT")
900 VOID
901 NTAPI
903  VOID
904 );
905 
906 //
907 // KCB Functions
908 //
910 NTAPI
912  IN PHHIVE Hive,
916  IN ULONG Flags,
918 );
919 
921 NTAPI
923  VOID
924 );
925 
926 VOID
927 NTAPI
930 );
931 
932 VOID
933 NTAPI
936 );
937 
938 VOID
939 NTAPI
942 );
943 
944 VOID
945 NTAPI
948  IN BOOLEAN LockHeldExclusively
949 );
950 
951 VOID
952 NTAPI
955 );
956 
958 NTAPI
961 );
962 
963 BOOLEAN
964 NTAPI
967 );
968 
969 VOID
970 NTAPI
973  IN BOOLEAN LockHeldExclusively
974 );
975 
976 VOID
977 NTAPI
980 );
981 
982 VOID
983 NTAPI
985  IN PCM_KEY_BODY KeyObject,
986  IN ULONG Flags
987 );
988 
989 VOID
990 NTAPI
992  IN PCM_KEY_BODY KeyBody,
993  IN BOOLEAN LockHeld
994 );
995 
996 VOID
997 NTAPI
999  IN ULONG ConvKey1,
1000  IN ULONG ConvKey2
1001 );
1002 
1003 VOID
1004 NTAPI
1006  IN ULONG ConvKey1,
1007  IN ULONG ConvKey2
1008 );
1009 
1010 VOID
1011 NTAPI
1014  IN BOOLEAN LockHeld
1015 );
1016 
1017 //
1018 // Parse Routines
1019 //
1020 BOOLEAN
1021 NTAPI
1024  OUT PUNICODE_STRING NextName,
1025  OUT PBOOLEAN LastName
1026 );
1027 
1028 //
1029 // Command Routines (Flush, Open, Close, Init);
1030 //
1031 BOOLEAN
1032 NTAPI
1034  IN BOOLEAN ForceFlush
1035 );
1036 
1037 VOID
1038 NTAPI
1040  VOID
1041 );
1042 
1043 VOID
1044 NTAPI
1045 CmpCmdInit(
1046  IN BOOLEAN SetupBoot
1047 );
1048 
1049 NTSTATUS
1050 NTAPI
1053  IN PSECURITY_CLIENT_CONTEXT ImpersonationContext,
1055  OUT PCMHIVE *NewHive,
1056  IN ULONG CheckFlags
1057 );
1058 
1059 VOID
1060 NTAPI
1061 CmpLazyFlush(
1062  VOID
1063 );
1064 
1065 //
1066 // Open/Create Routines
1067 //
1068 NTSTATUS
1069 NTAPI
1070 CmpDoCreate(
1071  IN PHHIVE Hive,
1072  IN HCELL_INDEX Cell,
1077  IN PCM_KEY_CONTROL_BLOCK ParentKcb,
1078  OUT PVOID *Object
1079 );
1080 
1081 NTSTATUS
1082 NTAPI
1084  IN PHHIVE Hive,
1085  IN HCELL_INDEX Cell,
1091  IN PCM_KEY_CONTROL_BLOCK ParentKcb,
1092  OUT PVOID *Object
1093 );
1094 
1095 //
1096 // Boot Routines
1097 //
1098 CODE_SEG("INIT")
1099 VOID
1100 NTAPI
1102  IN PVOID SystemHiveData,
1103  IN PCM_SYSTEM_CONTROL_VECTOR ControlVector
1104 );
1105 
1106 NTSTATUS
1107 NTAPI
1109  IN USHORT ControlSet
1110 );
1111 
1112 //
1113 // Hardware Configuration Routines
1114 //
1115 CODE_SEG("INIT")
1116 NTSTATUS
1117 NTAPI
1119  IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
1121  OUT PHANDLE NewHandle,
1123  IN ULONG BusNumber,
1124  IN PUSHORT DeviceIndexTable
1125 );
1126 
1127 NTSTATUS
1128 NTAPI
1130  IN PLOADER_PARAMETER_BLOCK LoaderBlock
1131 );
1132 
1133 CODE_SEG("INIT")
1134 NTSTATUS
1135 NTAPI
1137  IN PLOADER_PARAMETER_BLOCK LoaderBlock
1138 );
1139 
1140 //
1141 // Wrapper Routines
1142 //
1143 NTSTATUS
1144 NTAPI
1148  OUT PKEVENT *Event
1149 );
1150 
1151 PVOID
1152 NTAPI
1153 CmpAllocate(
1154  IN SIZE_T Size,
1155  IN BOOLEAN Paged,
1156  IN ULONG Tag
1157 );
1158 
1159 VOID
1160 NTAPI
1161 CmpFree(
1162  IN PVOID Ptr,
1163  IN ULONG Quota
1164 );
1165 
1166 BOOLEAN
1167 NTAPI
1168 CmpFileRead(
1169  IN PHHIVE RegistryHive,
1170  IN ULONG FileType,
1172  OUT PVOID Buffer,
1174 );
1175 
1176 BOOLEAN
1177 NTAPI
1178 CmpFileWrite(
1179  IN PHHIVE RegistryHive,
1180  IN ULONG FileType,
1182  IN PVOID Buffer,
1184 );
1185 
1186 BOOLEAN
1187 NTAPI
1189  IN PHHIVE RegistryHive,
1190  IN ULONG FileType,
1191  IN ULONG FileSize,
1192  IN ULONG OldFileSize
1193 );
1194 
1195 BOOLEAN
1196 NTAPI
1197 CmpFileFlush(
1198  IN PHHIVE RegistryHive,
1199  IN ULONG FileType,
1201  IN ULONG Length
1202 );
1203 
1204 //
1205 // Configuration Manager side of Registry System Calls
1206 //
1207 NTSTATUS
1208 NTAPI
1211  IN ULONG Index,
1213  IN PVOID KeyValueInformation,
1214  IN ULONG Length,
1216 
1217 NTSTATUS
1218 NTAPI
1222  IN ULONG Type,
1223  IN PVOID Data,
1224  IN ULONG DataSize);
1225 
1226 NTSTATUS
1227 NTAPI
1230  IN PVOID KeyInformation,
1231  IN ULONG Length,
1233 );
1234 
1235 NTSTATUS
1236 NTAPI
1238  IN ULONG Index,
1240  IN PVOID KeyInformation,
1241  IN ULONG Length,
1243 );
1244 
1245 NTSTATUS
1246 NTAPI
1247 CmDeleteKey(
1248  IN PCM_KEY_BODY KeyBody
1249 );
1250 
1251 NTSTATUS
1252 NTAPI
1253 CmFlushKey(
1255  IN BOOLEAN EclusiveLock
1256 );
1257 
1258 NTSTATUS
1259 NTAPI
1263 );
1264 
1265 NTSTATUS
1266 NTAPI
1271  IN PVOID KeyValueInformation,
1272  IN ULONG Length,
1274 );
1275 
1276 NTSTATUS
1277 NTAPI
1278 CmLoadKey(
1279  IN POBJECT_ATTRIBUTES TargetKey,
1280  IN POBJECT_ATTRIBUTES SourceFile,
1281  IN ULONG Flags,
1282  IN PCM_KEY_BODY KeyBody
1283 );
1284 
1285 NTSTATUS
1286 NTAPI
1287 CmUnloadKey(
1289  IN ULONG Flags
1290 );
1291 
1292 ULONG
1293 NTAPI
1295  IN PCM_KEY_CONTROL_BLOCK RootKcb,
1296  IN BOOLEAN RemoveEmptyCacheEntries,
1297  IN BOOLEAN DereferenceOpenedEntries
1298 );
1299 
1301 NTAPI
1302 CmpCopyCell(
1303  IN PHHIVE SourceHive,
1304  IN HCELL_INDEX SourceCell,
1305  IN PHHIVE DestinationHive,
1306  IN HSTORAGE_TYPE StorageType
1307 );
1308 
1309 NTSTATUS
1310 NTAPI
1312  IN PHHIVE SourceHive,
1313  IN HCELL_INDEX SrcKeyCell,
1314  IN PHHIVE DestinationHive,
1315  IN HSTORAGE_TYPE StorageType,
1316  OUT PHCELL_INDEX DestKeyCell OPTIONAL
1317 );
1318 
1319 NTSTATUS
1320 NTAPI
1321 CmSaveKey(
1324  IN ULONG Flags
1325 );
1326 
1327 NTSTATUS
1328 NTAPI
1330  IN PCM_KEY_CONTROL_BLOCK HighKcb,
1331  IN PCM_KEY_CONTROL_BLOCK LowKcb,
1333 );
1334 
1335 //
1336 // Startup and Shutdown
1337 //
1338 CODE_SEG("INIT")
1339 BOOLEAN
1340 NTAPI
1342  VOID
1343 );
1344 
1345 VOID
1346 NTAPI
1348  VOID
1349 );
1350 
1351 VOID
1352 NTAPI
1354  IN BOOLEAN Enable
1355 );
1356 
1357 VOID
1358 NTAPI
1360  VOID
1361 );
1362 
1363 //
1364 // Driver List Routines
1365 //
1366 CODE_SEG("INIT")
1368 NTAPI
1370  VOID
1371 );
1372 
1373 //
1374 // Global variables accessible from all of Cm
1375 //
1376 extern ULONG CmpTraceLevel;
1380 extern BOOLEAN CmpMiniNTBoot;
1385 extern ERESOURCE CmpRegistryLock;
1389 extern CMHIVE CmControlHive;
1390 extern WCHAR CmDefaultLanguageId[];
1393 extern WCHAR CmInstallUILanguageId[];
1396 extern ULONG CmNtGlobalFlag;
1402 extern UNICODE_STRING CmTypeName[];
1403 extern UNICODE_STRING CmClassName[];
1405 extern USHORT CmpUnknownBusCount;
1406 extern ULONG CmpTypeCount[MaximumType + 1];
1411 extern BOOLEAN CmSelfHeal;
1412 extern BOOLEAN CmpSelfHeal;
1413 extern ULONG CmpBootType;
1416 extern BOOLEAN InitIsWinPEMode;
1417 extern ULONG CmpHashTableSize;
1419 extern BOOLEAN CmpNoWrite;
1421 extern BOOLEAN CmpWasSetupBoot;
1422 extern BOOLEAN CmpProfileLoaded;
1423 extern PCMHIVE CmiVolatileHive;
1425 extern BOOLEAN CmpHoldLazyFlush;
1426 
1427 //
1428 // Inlined functions
1429 //
1430 #include "cm_x.h"
struct _CM_SYSTEM_CONTROL_VECTOR * PCM_SYSTEM_CONTROL_VECTOR
NTSTATUS NTAPI CmpDeepCopyKey(IN PHHIVE SourceHive, IN HCELL_INDEX SrcKeyCell, IN PHHIVE DestinationHive, IN HSTORAGE_TYPE StorageType, OUT PHCELL_INDEX DestKeyCell OPTIONAL)
Definition: cmapi.c:2621
UNICODE_STRING CmClassName[]
signed char * PCHAR
Definition: retypes.h:7
struct _CM_NAME_HASH CM_NAME_HASH
NTSTATUS NTAPI CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, IN PCWSTR Extension OPTIONAL, OUT PHANDLE Primary, OUT PHANDLE Log, OUT PULONG PrimaryDisposition, OUT PULONG LogDisposition, IN BOOLEAN CreateAllowed, IN BOOLEAN MarkAsSystemHive, IN BOOLEAN NoBuffering, OUT PULONG ClusterSize OPTIONAL)
Definition: cminit.c:266
VOID NTAPI CmpFlushNotifiesOnKeyBodyList(IN PCM_KEY_CONTROL_BLOCK Kcb, IN BOOLEAN LockHeld)
Definition: cmkcbncb.c:1139
* PNTSTATUS
Definition: strlen.c:14
BOOLEAN NTAPI CmpTestRegistryLockExclusive(VOID)
Definition: cmsysini.c:1886
ObjectType
Definition: metafile.c:80
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:39
PCHAR Identifier
Definition: cm.h:426
ULONG ConvKey
Definition: cm.h:158
const uint16_t * PCWSTR
Definition: typedefs.h:57
NTSTATUS NTAPI CmpCreateEvent(IN EVENT_TYPE EventType, OUT PHANDLE EventHandle, OUT PKEVENT *Event)
Definition: cmwraprs.c:19
#define IN
Definition: typedefs.h:39
NTSTATUS NTAPI CmpCmdHiveOpen(IN POBJECT_ATTRIBUTES FileAttributes, IN PSECURITY_CLIENT_CONTEXT ImpersonationContext, IN OUT PBOOLEAN Allocate, OUT PCMHIVE *NewHive, IN ULONG CheckFlags)
Definition: cmlazy.c:272
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
UNICODE_STRING CmpSystemStartOptions
PCM_KEY_BODY KeyBody
Definition: cm.h:313
PVOID AllocPage
Definition: cm.h:335
BOOLEAN NTAPI CmpGetHiveName(IN PCMHIVE Hive, OUT PUNICODE_STRING HiveName)
Definition: cmhvlist.c:24
VALUE_SEARCH_RETURN_TYPE NTAPI CmpQueryKeyValueData(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PCM_CACHED_VALUE *CachedValue, IN PCM_KEY_VALUE ValueKey, IN BOOLEAN ValueIsCached, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength, OUT PNTSTATUS Status)
Definition: cmvalche.c:327
PKTHREAD Owner
Definition: cm.h:149
VOID NTAPI CmpLockHiveFlusherExclusive(IN PCMHIVE Hive)
Definition: cmsysini.c:1894
PCM_KEY_BODY KeyBodyArray[4]
Definition: cm.h:289
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ULONG CmHiveFlags
Definition: cm.h:398
VOID NTAPI CmpDereferenceKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:571
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _CM_SYSTEM_CONTROL_VECTOR CM_SYSTEM_CONTROL_VECTOR
USHORT Count
Definition: cm.h:428
Definition: cm.h:129
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
struct _CM_NAME_CONTROL_BLOCK CM_NAME_CONTROL_BLOCK
EX_PUSH_LOCK Lock
Definition: cm.h:148
VOID NTAPI DelistKeyBodyFromKCB(IN PCM_KEY_BODY KeyBody, IN BOOLEAN LockHeld)
Definition: cmkcbncb.c:1100
struct _KEY_INFORMATION * PKEY_INFORMATION
WCHAR RootDirectory[MAX_PATH]
Definition: format.c:74
HCELL_INDEX OldCell
Definition: cm.h:324
BOOLEAN ThreadStarted
Definition: cm.h:401
ULONG FreeCount
Definition: cm.h:333
NTSTATUS CmiCallRegisteredCallbacks(IN REG_NOTIFY_CLASS Argument1, IN PVOID Argument2)
Definition: cmhook.c:59
_In_ ULONG _In_ KEY_INFORMATION_CLASS KeyInformationClass
Definition: zwfuncs.h:166
enum _KEY_INFORMATION_CLASS KEY_INFORMATION_CLASS
ULONG Signature
Definition: cm.h:253
ULONG ExtFlags
Definition: cm.h:257
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
UNICODE_STRING CmSymbolicLinkValueName
Definition: cmdata.c:52
HCELL_INDEX NewCell
Definition: cm.h:325
UNICODE_STRING CmTypeName[]
struct _CM_KEY_CONTROL_BLOCK * ParentKcb
Definition: cm.h:274
struct _CM_KEY_HASH_TABLE_ENTRY CM_KEY_HASH_TABLE_ENTRY
EX_PUSH_LOCK CmpHiveListHeadLock
Definition: cmdata.c:39
PUNICODE_STRING *NTAPI CmGetSystemDriverList(VOID)
Definition: cmsysini.c:1727
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
uint16_t * PWSTR
Definition: typedefs.h:56
CACHED_CHILD_LIST ValueCache
Definition: cm.h:277
NTSTATUS NTAPI CmpParseKey(IN PVOID ParseObject, IN PVOID ObjectType, IN OUT PACCESS_STATE AccessState, IN KPROCESSOR_MODE AccessMode, IN ULONG Attributes, IN OUT PUNICODE_STRING CompleteName, IN OUT PUNICODE_STRING RemainingName, IN OUT PVOID Context OPTIONAL, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, OUT PVOID *Object)
Definition: cmparse.c:1030
BOOLEAN CmpNoWrite
Definition: cmsysini.c:29
ULONG NotifyPending
Definition: cm.h:316
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
struct _CM_CACHED_VALUE_INDEX CM_CACHED_VALUE_INDEX
ULONG CmNtGlobalFlag
Definition: cmdata.c:19
PCM_KEY_CONTROL_BLOCK NTAPI CmpCreateKeyControlBlock(IN PHHIVE Hive, IN HCELL_INDEX Index, IN PCM_KEY_NODE Node, IN PCM_KEY_CONTROL_BLOCK Parent, IN ULONG Flags, IN PUNICODE_STRING KeyName)
Definition: cmkcbncb.c:655
LONG NTSTATUS
Definition: precomp.h:26
struct _CM_NAME_HASH * PCM_NAME_HASH
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
ULONG ConvKey
Definition: cm.h:137
VOID NTAPI CmpAddToDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb, IN BOOLEAN LockHeldExclusively)
Definition: cmdelay.c:350
VOID NTAPI CmpInitDelayDerefKCBEngine(VOID)
Definition: cmdelay.c:268
ERESOURCE CmpRegistryLock
Definition: cmsysini.c:19
NTSTATUS NTAPI CmSetValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PUNICODE_STRING ValueName, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: cmapi.c:644
NTSTATUS NTAPI CmpAddToHiveFileList(IN PCMHIVE Hive)
Definition: cmhvlist.c:130
struct _CM_NAME_CONTROL_BLOCK * PCM_NAME_CONTROL_BLOCK
#define New(t)
Definition: rtf.h:1086
ULONG ValueList
Definition: cm.h:202
HCELL_INDEX KeyCell
Definition: cm.h:271
BOOLEAN CmpFlushOnLockRelease
Definition: cmsysini.c:27
ULONG NTAPI CmCheckRegistry(IN PCMHIVE Hive, IN ULONG Flags)
Definition: cmcheck.c:21
VOID NTAPI CmpCmdInit(IN BOOLEAN SetupBoot)
Definition: cmlazy.c:234
VOID NTAPI CmpShutdownWorkers(VOID)
Definition: cmlazy.c:433
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
BOOLEAN CmpNoVolatileCreates
Definition: cmsysini.c:32
PCMHIVE CmHive
Definition: cm.h:396
BOOLEAN NTAPI CmpFileRead(IN PHHIVE RegistryHive, IN ULONG FileType, IN OUT PULONG FileOffset, OUT PVOID Buffer, IN SIZE_T BufferLength)
VALUE_SEARCH_RETURN_TYPE NTAPI CmpGetValueListFromCache(IN PCM_KEY_CONTROL_BLOCK Kcb, OUT PCELL_DATA *CellData, OUT BOOLEAN *IndexIsCached, OUT PHCELL_INDEX ValueListToRelease)
Definition: cmvalche.c:44
ULONG CmpDelayedCloseIndex
VOID NTAPI CmpCloseHiveFiles(IN PCMHIVE Hive)
Definition: cminit.c:631
LIST_ENTRY KeyBodyList
Definition: cm.h:225
VOID NTAPI CmpInitializeCache(VOID)
Definition: cmkcbncb.c:26
VOID NTAPI CmpDelayDerefKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmdelay.c:286
UNICODE_STRING CmpLoadOptions
Definition: cmdata.c:55
BOOLEAN NTAPI CmpFileWrite(IN PHHIVE RegistryHive, IN ULONG FileType, IN OUT PULONG FileOffset, IN PVOID Buffer, IN SIZE_T BufferLength)
struct _CM_INDEX_HINT_BLOCK * PCM_INDEX_HINT_BLOCK
VOID NTAPI CmpInitCallback(VOID)
Definition: cmhook.c:38
struct _CM_NOTIFY_BLOCK CM_NOTIFY_BLOCK
WORD LANGID
Definition: typedefs.h:81
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:728
HCELL_INDEX CellIndex
Definition: cm.h:370
PCM_NAME_CONTROL_BLOCK NameBlock
Definition: cm.h:275
BOOLEAN InitIsWinPEMode
Definition: init.c:72
uint16_t * PWCHAR
Definition: typedefs.h:56
struct _CM_NAME_HASH_TABLE_ENTRY * PCM_NAME_HASH_TABLE_ENTRY
_In_ PKSNODE_CREATE _In_ ACCESS_MASK _Out_ PHANDLE NodeHandle
Definition: ks.h:4546
PUNICODE_STRING NTAPI CmpConstructName(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:897
PCM_KEY_HASH_TABLE_ENTRY CmpCacheTable
Definition: cmkcbncb.c:18
PCM_KEY_CONTROL_BLOCK KeyControlBlock
Definition: cm.h:353
ULONG TotalLevels
Definition: cm.h:261
struct _CM_NOTIFY_BLOCK * NotifyBlock
Definition: cm.h:223
ULONG CreateOptions
Definition: cm.h:412
KEY_FULL_INFORMATION KeyFullInformation
Definition: cm.h:462
CMP_MF_TYPE CmpMultifunctionTypes[]
LARGE_INTEGER KcbLastWriteTime
Definition: cm.h:291
KEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInformation
Definition: cm.h:452
BOOLEAN CmpMiniNTBoot
Definition: cmdata.c:60
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:814
NTSTATUS NTAPI CmpSecurityMethod(IN PVOID Object, IN SECURITY_OPERATION_CODE OperationType, IN PSECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN OUT PULONG CapturedLength, IN OUT PSECURITY_DESCRIPTOR *ObjectSecurityDescriptor, IN POOL_TYPE PoolType, IN PGENERIC_MAPPING GenericMapping)
VOID NTAPI CmpFreeDelayItem(PVOID Entry)
Definition: cmalloc.c:266
struct _CACHED_CHILD_LIST CACHED_CHILD_LIST
BOOLEAN NTAPI CmpTestHiveFlusherLockExclusive(IN PCMHIVE Hive)
Definition: cmsysini.c:1936
ULONG KcbVirtControlFlags
Definition: cm.h:298
struct _CM_KEY_SECURITY_CACHE CM_KEY_SECURITY_CACHE
HANDLE ProcessID
Definition: cm.h:224
uint32_t ULONG_PTR
Definition: typedefs.h:65
ULONG HashKey[ANYSIZE_ARRAY]
Definition: cm.h:213
struct _CM_PARSE_CONTEXT CM_PARSE_CONTEXT
NTSTATUS NTAPI CmLoadKey(IN POBJECT_ATTRIBUTES TargetKey, IN POBJECT_ATTRIBUTES SourceFile, IN ULONG Flags, IN PCM_KEY_BODY KeyBody)
Definition: cmapi.c:2004
VOID NTAPI CmpUnlockHiveFlusher(IN PCMHIVE Hive)
Definition: cmsysini.c:1916
ULONG PrivateAlloc
Definition: cm.h:258
HCELL_INDEX KeyCell
Definition: cm.h:140
ULONG DescriptorLength
Definition: cm.h:181
struct _HIVE_LIST_ENTRY HIVE_LIST_ENTRY
CM_KEY_VALUE KeyValue
Definition: cm.h:386
ULONG Disposition
Definition: cm.h:413
HCELL_INDEX Cell
Definition: cm.h:190
struct _CM_CELL_REMAP_BLOCK * PCM_CELL_REMAP_BLOCK
KEY_BASIC_INFORMATION KeyBasicInformation
Definition: cm.h:461
LIST_ENTRY CmpHiveListHead
Definition: cmsysini.c:18
VOID NTAPI CmpArmDelayedCloseTimer(VOID)
Definition: cmdelay.c:335
VOID NTAPI CmpDeleteKeyObject(IN PVOID Object)
struct _CM_KEY_CONTROL_BLOCK * RealKcb
Definition: cm.h:203
VOID NTAPI CmSetLazyFlushState(IN BOOLEAN Enable)
Definition: cmlazy.c:442
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN ThreadFinished
Definition: cm.h:400
_In_ WDFDEVICE _In_ WDF_SPECIAL_FILE_TYPE FileType
Definition: wdfdevice.h:2739
USHORT KcbMaxValueNameLen
Definition: cm.h:293
CM_KEY_REFERENCE ChildHive
Definition: cm.h:414
ULONG Count
Definition: cm.h:199
KGUARDED_MUTEX CmpDelayedCloseTableLock
Definition: cmdelay.c:21
NTSTATUS NTAPI CmEnumerateValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
Definition: cmapi.c:1192
PCM_NAME_HASH Entry
Definition: cm.h:170
LIST_ENTRY HiveList
Definition: cm.h:310
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
ULONG CmpTraceLevel
Definition: cmsysini.c:33
ULONG InDelayClose
Definition: cm.h:302
VOID NTAPI CmpUnlockRegistry(VOID)
Definition: cmsysini.c:1944
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:395
struct _CM_KEY_CONTROL_BLOCK * PCM_KEY_CONTROL_BLOCK
PCM_KEY_CONTROL_BLOCK Kcb
Definition: cm.h:362
VALUE_SEARCH_RETURN_TYPE NTAPI CmpGetValueKeyFromCache(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PCELL_DATA CellData, IN ULONG Index, OUT PCM_CACHED_VALUE **CachedValue, OUT PCM_KEY_VALUE *Value, IN BOOLEAN IndexIsCached, OUT BOOLEAN *ValueIsCached, OUT PHCELL_INDEX CellToRelease)
Definition: cmvalche.c:96
LANGID PsInstallUILanguageId
Definition: locale.c:21
struct _HIVE_LIST_ENTRY * PHIVE_LIST_ENTRY
unsigned char BOOLEAN
struct _CACHED_CHILD_LIST * PCACHED_CHILD_LIST
struct _KEY_VALUE_INFORMATION * PKEY_VALUE_INFORMATION
ULONG * PHCELL_INDEX
Definition: hivedata.h:80
static IDispatch External
Definition: htmldoc.c:521
POBJECT_TYPE CmpKeyObjectType
Definition: cmsysini.c:16
ULONG CmInstallUILanguageIdLength
Definition: cmdata.c:27
USHORT NameLength
Definition: cm.h:242
NTSTATUS NTAPI CmpDoCreate(IN PHHIVE Hive, IN HCELL_INDEX Cell, IN PACCESS_STATE AccessState, IN PUNICODE_STRING Name, IN KPROCESSOR_MODE AccessMode, IN PCM_PARSE_CONTEXT Context, IN PCM_KEY_CONTROL_BLOCK ParentKcb, OUT PVOID *Object)
Definition: cmparse.c:403
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1339
Definition: bufpool.h:45
LIST_ENTRY List
Definition: cm.h:180
struct _CM_KEY_CONTROL_BLOCK CM_KEY_CONTROL_BLOCK
VOID NTAPI CmpLockRegistryExclusive(VOID)
Definition: cmsysini.c:1845
struct _CM_KEY_SECURITY_CACHE_ENTRY * PCM_KEY_SECURITY_CACHE_ENTRY
USHORT NameLength
Definition: cm.h:160
PVOID NTAPI CmpAllocate(IN SIZE_T Size, IN BOOLEAN Paged, IN ULONG Tag)
Definition: registry.c:46
_VALUE_SEARCH_RETURN_TYPE
Definition: cm.h:125
BOOLEAN CmpShareSystemHives
Definition: cmdata.c:57
struct _CM_DELAY_DEREF_KCB_ITEM CM_DELAY_DEREF_KCB_ITEM
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2697
_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 FileAttributes
Definition: fltkernel.h:1230
BOOLEAN Compressed
Definition: cm.h:233
LIST_ENTRY PostList
Definition: cm.h:311
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
PCM_KEY_HASH NextHash
Definition: cm.h:241
BOOLEAN NTAPI CmInitSystem1(VOID)
Definition: cmsysini.c:1511
_In_ PVOID Argument2
Definition: classpnp.h:721
NTSTATUS NTAPI CmSaveKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN HANDLE FileHandle, IN ULONG Flags)
Definition: cmapi.c:2638
NTSTATUS NTAPI CmUnloadKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN ULONG Flags)
Definition: cmapi.c:2195
NTSTATUS NTAPI CmpSaveBootControlSet(IN USHORT ControlSet)
Definition: cmcontrl.c:268
struct _CM_PARSE_CONTEXT * PCM_PARSE_CONTEXT
VOID NTAPI CmpFreeKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmalloc.c:53
enum _EVENT_TYPE EVENT_TYPE
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
struct _CM_KEY_CONTROL_BLOCK * KeyControlBlock
Definition: cm.h:222
Status
Definition: gdiplustypes.h:24
VOID NTAPI CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmdelay.c:425
VOID NTAPI CmpFree(IN PVOID Ptr, IN ULONG Quota)
Definition: registry.c:57
VOID NTAPI CmpSetGlobalQuotaAllowed(VOID)
Definition: cmquota.c:22
Definition: registry.c:568
BOOLEAN NTAPI CmpReferenceKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:357
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
struct _CM_DELAYED_CLOSE_ENTRY CM_DELAYED_CLOSE_ENTRY
UNICODE_STRING Class
Definition: cm.h:411
NTSTATUS NTAPI CmDeleteKey(IN PCM_KEY_BODY KeyBody)
Definition: cmapi.c:1824
HIVE_LIST_ENTRY CmpMachineHiveList[]
Definition: cmdata.c:41
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD * PSECURITY_INFORMATION
Definition: ms-dtyp.idl:311
INT POOL_TYPE
Definition: typedefs.h:78
ULONG HCELL_INDEX
Definition: hivedata.h:80
_In_ WDFCOLLECTION _In_ ULONG Index
ULONG Filter
Definition: cm.h:314
BOOLEAN CmSelfHeal
Definition: cmdata.c:58
ULONG HashKey
Definition: cm.h:385
ULONG CmpBootType
Definition: cmdata.c:61
NTSTATUS NTAPI CmSaveMergedKeys(IN PCM_KEY_CONTROL_BLOCK HighKcb, IN PCM_KEY_CONTROL_BLOCK LowKcb, IN HANDLE FileHandle)
Definition: cmapi.c:2707
LIST_ENTRY DelayedLRUList
Definition: cm.h:352
NTSTATUS NTAPI CmpLinkHiveToMaster(IN PUNICODE_STRING LinkName, IN HANDLE RootDirectory, IN PCMHIVE CmHive, IN BOOLEAN Allocate, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: cmsysini.c:798
DWORD ClusterSize
Definition: format.c:67
struct _CM_DELAY_ALLOC * PCM_DELAY_ALLOC
Definition: cm.h:188
VOID NTAPI CmpInitializeDelayedCloseTable(VOID)
Definition: cmdelay.c:191
BOOLEAN ExpInTextModeSetup
Definition: init.c:69
Type
Definition: Type.h:6
ULONG CmDefaultLanguageIdType
Definition: cmdata.c:24
Definition: cm.h:350
struct _KEY_INFORMATION KEY_INFORMATION
ULONG CmpConfigurationAreaSize
Definition: cmdata.c:36
ULONG DelayedCloseIndex
Definition: cm.h:260
PCM_KEY_HASH NextHash
Definition: cm.h:269
Definition: cm.h:167
union _CM_CACHED_VALUE_INDEX::@1722 Data
VOID NTAPI CmpDestroySecurityCache(IN PCMHIVE Hive)
Definition: cmsecach.c:41
VOID NTAPI CmpCleanUpKcbCacheWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb, IN BOOLEAN LockHeldExclusively)
Definition: cmkcbncb.c:476
VOID NTAPI CmShutdownSystem(VOID)
Definition: cmsysini.c:2039
struct _CM_KEY_BODY CM_KEY_BODY
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
CM_SYSTEM_CONTROL_VECTOR CmControlVector[]
struct _CM_CACHED_VALUE_INDEX * PCM_CACHED_VALUE_INDEX
VALUE_SEARCH_RETURN_TYPE NTAPI CmpFindValueByNameFromCache(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PCUNICODE_STRING Name, OUT PCM_CACHED_VALUE **CachedValue, OUT ULONG *Index, OUT PCM_KEY_VALUE *Value, OUT BOOLEAN *ValueIsCached, OUT PHCELL_INDEX CellToRelease)
Definition: cmvalche.c:194
PHHIVE KeyHive
Definition: cm.h:139
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
Definition: sefuncs.h:414
BOOLEAN NTAPI CmpGetNextName(IN OUT PUNICODE_STRING RemainingName, OUT PUNICODE_STRING NextName, OUT PBOOLEAN LastName)
Definition: cmparse.c:21
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:240
PCMHIVE CmiVolatileHive
Definition: cmsysini.c:17
PVOID NTAPI CmpAllocateDelayItem(VOID)
Definition: cmalloc.c:196
char * PBOOLEAN
Definition: retypes.h:11
LIST_ENTRY CmiKeyObjectListHead
HANDLE PredefinedHandle
Definition: cm.h:415
VOID NTAPI CmpInitHiveViewList(IN PCMHIVE Hive)
Definition: cmmapvw.c:21
NTSTATUS NTAPI CmpQueryKeyName(IN PVOID Object, IN BOOLEAN HasObjectName, OUT POBJECT_NAME_INFORMATION ObjectNameInfo, IN ULONG Length, OUT PULONG ReturnLength, IN KPROCESSOR_MODE AccessMode)
VOID NTAPI EnlistKeyBodyWithKCB(IN PCM_KEY_BODY KeyObject, IN ULONG Flags)
Definition: cmkcbncb.c:1042
BOOLEAN CmpSelfHeal
Definition: cmdata.c:59
VOID NTAPI CmGetSystemControlValues(IN PVOID SystemHiveData, IN PCM_SYSTEM_CONTROL_VECTOR ControlVector)
Definition: cmcontrl.c:104
struct _KEY_VALUE_INFORMATION KEY_VALUE_INFORMATION
NTSTATUS NTAPI CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: cmhardwr.c:21
USHORT CmpUnknownBusCount
Definition: cmdata.c:63
BOOLEAN CmpSpecialBootCondition
Definition: cmsysini.c:28
enum _REG_NOTIFY_CLASS REG_NOTIFY_CLASS
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
VALUE_SEARCH_RETURN_TYPE NTAPI CmpCompareNewValueDataAgainstKCBCache(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PUNICODE_STRING ValueName, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: cmvalche.c:700
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
SECURITY_DESCRIPTOR_RELATIVE Descriptor
Definition: cm.h:182
struct _CM_KEY_SECURITY_CACHE_ENTRY CM_KEY_SECURITY_CACHE_ENTRY
NTSTATUS NTAPI CmFlushKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN BOOLEAN EclusiveLock)
Definition: cmapi.c:1938
ULONG CmpHashTableSize
Definition: cmkcbncb.c:17
struct _CM_NAME_HASH_TABLE_ENTRY CM_NAME_HASH_TABLE_ENTRY
HCELL_INDEX NTAPI CmpCopyCell(IN PHHIVE SourceHive, IN HCELL_INDEX SourceCell, IN PHHIVE DestinationHive, IN HSTORAGE_TYPE StorageType)
Definition: cmvalue.c:376
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
PHHIVE KeyHive
Definition: cm.h:270
struct _CM_DELAYED_CLOSE_ENTRY * PCM_DELAYED_CLOSE_ENTRY
ULONG KcbDebug
Definition: cm.h:299
HANDLE CmpRegistryRootHandle
Definition: cmdata.c:66
BOOLEAN CmpProfileLoaded
Definition: cmsysini.c:31
Definition: typedefs.h:119
WCHAR CmInstallUILanguageId[]
Definition: cmdata.c:26
NTSTATUS NTAPI CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, IN HANDLE NodeHandle, OUT PHANDLE NewHandle, IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PUSHORT DeviceIndexTable)
Definition: cmconfig.c:20
CELL_DATA CellData
Definition: cm.h:373
VOID NTAPI CmpDestroyHiveViewList(IN PCMHIVE Hive)
Definition: cmmapvw.c:35
NTSTATUS NTAPI CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName, IN ULONG HiveFlags, OUT PCMHIVE *Hive, IN OUT PBOOLEAN New, IN ULONG CheckFlags)
Definition: cmsysini.c:286
VOID NTAPI CmpLazyFlush(VOID)
Definition: cmlazy.c:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
VOID NTAPI CmpCloseKeyObject(IN PEPROCESS Process OPTIONAL, IN PVOID Object, IN ACCESS_MASK GrantedAccess, IN ULONG ProcessHandleCount, IN ULONG SystemHandleCount)
Definition: cmsysini.c:159
NTSTATUS NTAPI CmpCreateLinkNode(IN PHHIVE Hive, IN HCELL_INDEX Cell, IN PACCESS_STATE AccessState, IN UNICODE_STRING Name, IN KPROCESSOR_MODE AccessMode, IN ULONG CreateOptions, IN PCM_PARSE_CONTEXT Context, IN PCM_KEY_CONTROL_BLOCK ParentKcb, OUT PVOID *Object)
Definition: cmparse.c:727
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
Definition: wdfregistry.h:112
LIST_ENTRY KeyBodyListHead
Definition: cm.h:286
KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 KeyValuePartialInformationAlign64
Definition: cm.h:453
CMHIVE CmControlHive
Definition: cmdata.c:34
Definition: cm.h:146
struct _CM_KEY_HASH_TABLE_ENTRY * PCM_KEY_HASH_TABLE_ENTRY
VOID NTAPI CmpInitCmPrivateAlloc(VOID)
Definition: cmalloc.c:29
HCELL_INDEX Cell
Definition: cm.h:178
ULONG CmpTypeCount[MaximumType+1]
Definition: cmdata.c:64
struct _CMP_MF_TYPE CMP_MF_TYPE
ULONG_PTR SIZE_T
Definition: typedefs.h:80
USHORT RefCount
Definition: cm.h:234
NTSTATUS NTAPI CmQueryKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN KEY_INFORMATION_CLASS KeyInformationClass, IN PVOID KeyInformation, IN ULONG Length, IN PULONG ResultLength)
static GENERIC_MAPPING GenericMapping
Definition: SeInheritance.c:11
ULONG TitleIndex
Definition: cm.h:410
ULONG KcbUserFlags
Definition: cm.h:297
VOID NTAPI CmpLockRegistry(VOID)
Definition: cmsysini.c:1858
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1230
KEY_NODE_INFORMATION KeyNodeInformation
Definition: cm.h:463
USHORT DataCacheType
Definition: cm.h:383
LIST_ENTRY ListEntry
Definition: cm.h:343
struct _CMP_MF_TYPE * PCMP_MF_TYPE
ULONG CmpDelayedCloseSize
Definition: cmdelay.c:19
ULONG CmDefaultLanguageIdLength
Definition: cmdata.c:23
VOID NTAPI CmpReleaseTwoKcbLockByKey(IN ULONG ConvKey1, IN ULONG ConvKey2)
Definition: cmsysini.c:2001
struct _CM_CACHED_VALUE * PCM_CACHED_VALUE
EX_PUSH_LOCK CmpLoadHiveLock
Definition: cmdata.c:39
unsigned short USHORT
Definition: pedump.c:61
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:159
NTSTATUS NTAPI CmpInitializeHive(OUT PCMHIVE *CmHive, IN ULONG OperationType, IN ULONG HiveFlags, IN ULONG FileType, IN PVOID HiveData OPTIONAL, IN HANDLE Primary, IN HANDLE Log, IN HANDLE External, IN PCUNICODE_STRING FileName OPTIONAL, IN ULONG CheckFlags)
Definition: cminit.c:19
BOOLEAN CmpWasSetupBoot
Definition: cmsysini.c:30
HSTORAGE_TYPE
Definition: hivedata.h:100
BOOLEAN NTAPI CmpTestRegistryLock(VOID)
Definition: cmsysini.c:1878
VOID NTAPI CmpCleanUpSubKeyInfo(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:517
WCHAR CmDefaultLanguageId[]
Definition: cmdata.c:22
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN NTAPI CmpDoFlushAll(IN BOOLEAN ForceFlush)
Definition: cmapi.c:82
KEY_VALUE_FULL_INFORMATION KeyValueFullInformation
Definition: cm.h:451
VOID NTAPI CmpDereferenceKeyControlBlockWithLock(IN PCM_KEY_CONTROL_BLOCK Kcb, IN BOOLEAN LockHeldExclusively)
Definition: cmkcbncb.c:606
ULONG SubKeyCount
Definition: cm.h:282
PCM_KEY_CONTROL_BLOCK KeyControlBlock
Definition: cm.h:312
struct _CM_DELAY_ALLOC CM_DELAY_ALLOC
ULONG WatchTree
Definition: cm.h:315
BOOLEAN Allocate
Definition: cm.h:402
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
struct _CM_KEY_SECURITY_CACHE * PCM_KEY_SECURITY_CACHE
VOID NTAPI CmpLockHiveFlusherShared(IN PCMHIVE Hive)
Definition: cmsysini.c:1905
EX_PUSH_LOCK Lock
Definition: cm.h:169
USHORT KcbMaxNameLen
Definition: cm.h:292
PCM_KEY_HASH Entry
Definition: cm.h:150
#define OUT
Definition: typedefs.h:40
struct _CM_KEY_HASH CM_KEY_HASH
VOID NTAPI CmpInitializeHiveList(VOID)
Definition: cmsysini.c:1358
BOOLEAN NTAPI CmpFileFlush(IN PHHIVE RegistryHive, IN ULONG FileType, IN OUT PLARGE_INTEGER FileOffset, IN ULONG Length)
Definition: cmwraprs.c:162
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
struct _CM_ALLOC_PAGE CM_ALLOC_PAGE
ULONG ERESOURCE
Definition: env_spec_w32.h:594
PCMHIVE OriginatingPoint
Definition: cm.h:418
unsigned int ULONG
Definition: retypes.h:1
PCM_NAME_HASH_TABLE_ENTRY CmpNameCacheTable
Definition: cmkcbncb.c:19
ULONG RefCount
Definition: cm.h:254
PCM_KEY_CONTROL_BLOCK Kcb
Definition: cm.h:344
NTSTATUS NTAPI CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: cmconfig.c:328
VOID NTAPI CmpRemoveKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:306
CM_KEY_HASH KeyHash
Definition: cm.h:265
struct _CM_ALLOC_PAGE * PCM_ALLOC_PAGE
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE EventType
Definition: exfuncs.h:165
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
PCMHIVE CmHive2
Definition: cm.h:399
BOOLEAN NTAPI CmpTestHiveFlusherLockShared(IN PCMHIVE Hive)
Definition: cmsysini.c:1928
USHORT InterfaceType
Definition: cm.h:427
PCM_FULL_RESOURCE_DESCRIPTOR CmpConfigurationData
Definition: cmdata.c:37
BOOLEAN NTAPI CmpFileSetSize(IN PHHIVE RegistryHive, IN ULONG FileType, IN ULONG FileSize, IN ULONG OldFileSize)
Definition: cmwraprs.c:125
PWSTR BaseName
Definition: cm.h:395
struct _CM_DELAY_DEREF_KCB_ITEM * PCM_DELAY_DEREF_KCB_ITEM
ULONG NTAPI CmpEnumerateOpenSubKeys(IN PCM_KEY_CONTROL_BLOCK RootKcb, IN BOOLEAN RemoveEmptyCacheEntries, IN BOOLEAN DereferenceOpenedEntries)
Definition: cmapi.c:2328
VOID NTAPI CmpReportNotify(IN PCM_KEY_CONTROL_BLOCK Kcb, IN PHHIVE Hive, IN HCELL_INDEX Cell, IN ULONG Filter)
Definition: cmnotify.c:19
PVOID DelayCloseEntry
Definition: cm.h:290
VOID NTAPI CmpInitSecurityCache(IN PCMHIVE Hive)
Definition: cmsecach.c:21
enum _VALUE_SEARCH_RETURN_TYPE VALUE_SEARCH_RETURN_TYPE
ULONG Type
Definition: cm.h:221
_In_ ULONG _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
Definition: cmfuncs.h:93
PCM_KEY_SECURITY_CACHE CachedSecurity
Definition: cm.h:276
struct _CM_CACHED_VALUE CM_CACHED_VALUE
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
struct _CM_KEY_BODY * PCM_KEY_BODY
VOID NTAPI CmpInitCmPrivateDelayAlloc(VOID)
Definition: cmalloc.c:44
BOOLEAN CreateLink
Definition: cm.h:416
KEY_VALUE_BASIC_INFORMATION KeyValueBasicInformation
Definition: cm.h:450
ULONG Reserved
Definition: cm.h:334
NTSTATUS NTAPI CmpDestroyHive(IN PCMHIVE CmHive)
Definition: cminit.c:235
struct _CM_NAME_HASH * NextHash
Definition: cm.h:159
VOID NTAPI CmpCleanUpKcbValueCache(IN PCM_KEY_CONTROL_BLOCK Kcb)
Definition: cmkcbncb.c:431
struct _CM_CELL_REMAP_BLOCK CM_CELL_REMAP_BLOCK
CM_NAME_HASH NameHash
Definition: cm.h:237
PWSTR Name
Definition: cm.h:394
VOID NTAPI CmpRemoveFromHiveFileList(IN PCMHIVE Hive)
Definition: cmhvlist.c:254
ULONG HHiveFlags
Definition: cm.h:397
ULONG KcbMaxValueDataLen
Definition: cm.h:294
BOOLEAN CmpForceForceFlush
Definition: cmlazy.c:23
LIST_ENTRY FreeListEntry
Definition: cm.h:287
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
VOID NTAPI CmpSetVersionData(VOID)
Definition: cmsysini.c:2067
PSECURITY_DESCRIPTOR NTAPI CmpHiveRootSecurityDescriptor(VOID)
Definition: cmse.c:21
PCM_KEY_SECURITY_CACHE CachedSecurity
Definition: cm.h:191
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
SECURITY_OPERATION_CODE
Definition: setypes.h:170
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
unsigned short * PUSHORT
Definition: retypes.h:2
BOOLEAN CreateOperation
Definition: cm.h:417
ULONG ACCESS_MASK
Definition: nt_native.h:40
PCM_INDEX_HINT_BLOCK IndexHint
Definition: cm.h:280
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
base of all file and directory entries
Definition: entries.h:82
LIST_ENTRY ListEntry
Definition: cm.h:361
VOID NTAPI CmpFlushNotify(IN PCM_KEY_BODY KeyBody, IN BOOLEAN LockHeld)
Definition: cmnotify.c:30
LANGID PsDefaultUILanguageId
Definition: locale.c:25
Definition: cmlib.h:244
struct _CM_KEY_HASH * NextHash
Definition: cm.h:138
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
Definition: reg.c:135
NTSTATUS NTAPI CmDeleteValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN UNICODE_STRING ValueName)
Definition: cmapi.c:916
ULONG CmInstallUILanguageIdType
Definition: cmdata.c:28
struct _CM_NOTIFY_BLOCK * PCM_NOTIFY_BLOCK
PCM_KEY_CONTROL_BLOCK NTAPI CmpAllocateKeyControlBlock(VOID)
Definition: cmalloc.c:111
USHORT ValueKeySize
Definition: cm.h:384
struct _CM_INDEX_HINT_BLOCK CM_INDEX_HINT_BLOCK
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Inout_ PFCB _Inout_ PUNICODE_STRING RemainingName
Definition: cdprocs.h:801
NTSTATUS NTAPI CmEnumerateKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN ULONG Index, IN KEY_INFORMATION_CLASS KeyInformationClass, IN PVOID KeyInformation, IN ULONG Length, IN PULONG ResultLength)
Definition: cmapi.c:1735
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:857
NTSTATUS NTAPI CmQueryValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb, IN UNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
Definition: cmapi.c:1075
struct _CM_KEY_HASH * PCM_KEY_HASH
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
VOID NTAPI CmpAcquireTwoKcbLocksExclusiveByKey(IN ULONG ConvKey1, IN ULONG ConvKey2)
Definition: cmsysini.c:1972