Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

995 lines
19 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. ismp.h
  5. Abstract:
  6. Declares types, constants, macros, etc., internal to the ISM source modules.
  7. Author:
  8. Jim Schmidt (jimschm) 02-Mar-2000
  9. Revision History:
  10. <alias> <date> <comments>
  11. --*/
  12. //
  13. // Includes
  14. //
  15. #include "logmsg.h"
  16. //
  17. // Strings
  18. //
  19. #define S_COMMON TEXT("Common")
  20. #define S_PROHIBITED_COMBINATIONS TEXT("Prohibited Operation Combinations")
  21. #define S_IGNORED_COLLISIONS TEXT("Ignored Operation Collisions")
  22. #define S_SHORTLONG_TREE TEXT("ShortLong")
  23. #define S_OBJECTCOUNT TEXT("ObjectCount")
  24. #define S_TOTAL_OBJECTS TEXT("TotalObjects")
  25. #define S_LEFT_SIDE_OBJECTS TEXT("LeftSideObjects")
  26. #define S_PERSISTENT_OBJECTS TEXT("PersistentObjects")
  27. #define S_APPLY_OBJECTS TEXT("ApplyObjects")
  28. #define S_TRANSPORT_PREFIX TEXT("TransportVariable")
  29. //
  30. // Constants
  31. //
  32. #ifdef DEBUG
  33. #define TRACK_ENTER() TrackPushEx (NULL, File, Line, TRUE)
  34. #define TRACK_LEAVE() TrackPop ()
  35. #else
  36. #define TRACK_ENTER()
  37. #define TRACK_LEAVE()
  38. #endif
  39. #define MAX_OBJECT_LEVEL 0xFFFFFFFF
  40. #define ATTRIBUTE_INDEX 0
  41. #define PROPERTY_INDEX 1
  42. #define OPERATION_INDEX 2
  43. //
  44. // Used by short file names preservation
  45. //
  46. #define FILENAME_UNDECIDED 0x00000000
  47. #define FILENAME_LONG 0x00000001
  48. #define FILENAME_SHORT 0x00000002
  49. //
  50. // Used by rollback
  51. //
  52. #define JRN_SIGNATURE 0x4A4D5355 //USMJ
  53. #define JRN_VERSION 0x00000001
  54. #define JOURNAL_HEADER_SIZE (2 * sizeof (DWORD))
  55. #define JOURNAL_USER_DATA_SIZE (4 * MAX_TCHAR_PATH + sizeof (BOOL))
  56. #define JOURNAL_FULL_HEADER_SIZE (JOURNAL_HEADER_SIZE + JOURNAL_USER_DATA_SIZE)
  57. // Used by per-user delayed operations journal
  58. #define JRN_USR_SIGNATURE 0x4A4D534A //USMU
  59. #define JRN_USR_VERSION 0x00000001
  60. #define JRN_USR_DIRTY 0x00000001
  61. #define JRN_USR_COMPLETE 0x00000002
  62. #define JRN_USR_HEADER_SIZE (3 * sizeof (DWORD))
  63. // High Priority/Low Priority operations
  64. #define OP_HIGH_PRIORITY 0x00000001
  65. #define OP_LOW_PRIORITY 0x00000002
  66. #define OP_ALL_PRIORITY OP_HIGH_PRIORITY|OP_LOW_PRIORITY
  67. //
  68. // Macros
  69. //
  70. #define ISRIGHTSIDEOBJECT(ObjectTypeId) ((ObjectTypeId & PLATFORM_MASK) == PLATFORM_DESTINATION)
  71. #define ISLEFTSIDEOBJECT(ObjectTypeId) ((ObjectTypeId & PLATFORM_MASK) == PLATFORM_SOURCE)
  72. //
  73. // Types
  74. //
  75. typedef struct {
  76. BOOL Initialized;
  77. PCTSTR EtmPath;
  78. PCTSTR Group;
  79. HANDLE LibHandle;
  80. PETMINITIALIZE EtmInitialize;
  81. PETMPARSE EtmParse;
  82. PETMTERMINATE EtmTerminate;
  83. PETMNEWUSERCREATED EtmNewUserCreated;
  84. BOOL ShouldBeCalled;
  85. } ETMDATA, *PETMDATA;
  86. typedef struct {
  87. BOOL Initialized;
  88. PCTSTR VcmPath;
  89. PCTSTR Group;
  90. HANDLE LibHandle;
  91. PVCMINITIALIZE VcmInitialize;
  92. PVCMPARSE VcmParse;
  93. PVCMQUEUEENUMERATION VcmQueueEnumeration;
  94. PVCMQUEUEHIGHPRIORITYENUMERATION VcmQueueHighPriorityEnumeration;
  95. PVCMTERMINATE VcmTerminate;
  96. BOOL ShouldBeCalled;
  97. } VCMDATA, *PVCMDATA;
  98. typedef struct {
  99. BOOL Initialized;
  100. PCTSTR SgmPath;
  101. PCTSTR Group;
  102. HANDLE LibHandle;
  103. PSGMINITIALIZE SgmInitialize;
  104. PSGMPARSE SgmParse;
  105. PSGMQUEUEENUMERATION SgmQueueEnumeration;
  106. PSGMQUEUEHIGHPRIORITYENUMERATION SgmQueueHighPriorityEnumeration;
  107. PSGMTERMINATE SgmTerminate;
  108. BOOL ShouldBeCalled;
  109. } SGMDATA, *PSGMDATA;
  110. typedef struct {
  111. BOOL Initialized;
  112. PCTSTR SamPath;
  113. PCTSTR Group;
  114. HANDLE LibHandle;
  115. PSAMINITIALIZE SamInitialize;
  116. PSAMEXECUTE SamExecute;
  117. PSAMESTIMATEPROGRESSBAR SamEstimateProgressBar;
  118. PSAMTERMINATE SamTerminate;
  119. BOOL ShouldBeCalled;
  120. } SAMDATA, *PSAMDATA;
  121. typedef struct {
  122. BOOL Initialized;
  123. PCTSTR DgmPath;
  124. PCTSTR Group;
  125. HANDLE LibHandle;
  126. PDGMINITIALIZE DgmInitialize;
  127. PDGMQUEUEENUMERATION DgmQueueEnumeration;
  128. PDGMQUEUEHIGHPRIORITYENUMERATION DgmQueueHighPriorityEnumeration;
  129. PDGMTERMINATE DgmTerminate;
  130. BOOL ShouldBeCalled;
  131. } DGMDATA, *PDGMDATA;
  132. typedef struct {
  133. BOOL Initialized;
  134. PCTSTR DamPath;
  135. PCTSTR Group;
  136. HANDLE LibHandle;
  137. PDAMINITIALIZE DamInitialize;
  138. PDAMEXECUTE DamExecute;
  139. PDAMESTIMATEPROGRESSBAR DamEstimateProgressBar;
  140. PDAMTERMINATE DamTerminate;
  141. BOOL ShouldBeCalled;
  142. } DAMDATA, *PDAMDATA;
  143. typedef struct {
  144. BOOL Initialized;
  145. PCTSTR CsmPath;
  146. PCTSTR Group;
  147. HANDLE LibHandle;
  148. PCSMINITIALIZE CsmInitialize;
  149. PCSMEXECUTE CsmExecute;
  150. PCSMESTIMATEPROGRESSBAR CsmEstimateProgressBar;
  151. PCSMTERMINATE CsmTerminate;
  152. BOOL ShouldBeCalled;
  153. } CSMDATA, *PCSMDATA;
  154. typedef struct {
  155. BOOL Initialized;
  156. PCTSTR OpmPath;
  157. PCTSTR Group;
  158. HANDLE LibHandle;
  159. POPMINITIALIZE OpmInitialize;
  160. POPMTERMINATE OpmTerminate;
  161. BOOL ShouldBeCalled;
  162. } OPMDATA, *POPMDATA;
  163. typedef struct {
  164. BOOL Initialized;
  165. PCTSTR TransportPath;
  166. PCTSTR Group;
  167. HANDLE LibHandle;
  168. PTRANSPORTINITIALIZE TransportInitialize;
  169. PTRANSPORTTERMINATE TransportTerminate;
  170. PTRANSPORTQUERYCAPABILITIES TransportQueryCapabilities;
  171. PTRANSPORTSETSTORAGE TransportSetStorage;
  172. PTRANSPORTRESETSTORAGE TransportResetStorage;
  173. PTRANSPORTSAVESTATE TransportSaveState;
  174. PTRANSPORTRESUMESAVESTATE TransportResumeSaveState;
  175. PTRANSPORTBEGINAPPLY TransportBeginApply;
  176. PTRANSPORTRESUMEAPPLY TransportResumeApply;
  177. PTRANSPORTACQUIREOBJECT TransportAcquireObject;
  178. PTRANSPORTRELEASEOBJECT TransportReleaseObject;
  179. PTRANSPORTENDAPPLY TransportEndApply;
  180. PTRANSPORTESTIMATEPROGRESSBAR TransportEstimateProgressBar;
  181. BOOL ShouldBeCalled;
  182. } TRANSPORTDATA, *PTRANSPORTDATA;
  183. typedef struct {
  184. MIG_PLATFORMTYPEID Platform;
  185. ENVENTRY_TYPE EnvEntryType;
  186. PCTSTR EnvEntryGroup;
  187. PCTSTR EnvEntryName;
  188. UINT EnvEntryDataSize;
  189. PBYTE EnvEntryData;
  190. MEMDB_ENUM Handle;
  191. } ENV_ENTRY_ENUM, *PENV_ENTRY_ENUM;
  192. typedef struct {
  193. HANDLE FileHandle;
  194. HANDLE MapHandle;
  195. TCHAR TempFile [MAX_PATH];
  196. BOOL Moved;
  197. BOOL OkToMove;
  198. ULONG_PTR TransportArg;
  199. } ACQUIREHANDLE, *PACQUIREHANDLE;
  200. typedef struct {
  201. MIG_OBJECTTYPEID ObjectTypeId;
  202. PPARSEDPATTERNW PlainNodeParsedPattern;
  203. PPARSEDPATTERNW NodeParsedPattern;
  204. PPARSEDPATTERNW LeafParsedPattern;
  205. } DBENUM_ARGS, *PDBENUM_ARGS;
  206. typedef struct {
  207. PCTSTR UserName;
  208. PCTSTR DomainName;
  209. PCTSTR AccountName;
  210. PCTSTR UserProfileRoot;
  211. PCTSTR MapKey;
  212. PCTSTR UserHive;
  213. PCTSTR UserStringSid;
  214. PSID UserSid;
  215. PCTSTR DelayedOpJrn;
  216. HANDLE DelayedOpJrnHandle;
  217. // internal members
  218. PMHANDLE AllocPool;
  219. } TEMPORARYPROFILE, *PTEMPORARYPROFILE;
  220. typedef struct {
  221. PCTSTR UserName;
  222. PCTSTR UserDomain;
  223. PCTSTR UserStringSid;
  224. PCTSTR UserProfilePath;
  225. // internal members
  226. PMHANDLE AllocPool;
  227. } CURRENT_USER_DATA, *PCURRENT_USER_DATA;
  228. //
  229. // group registration enumeration
  230. //
  231. typedef struct {
  232. KEYHANDLE GroupOrItemId;
  233. BOOL ItemId;
  234. // private members
  235. MEMDB_ENUM EnumStruct;
  236. } GROUPREGISTRATION_ENUM, *PGROUPREGISTRATION_ENUM;
  237. typedef BOOL (GROUPITEM_CALLBACK_PROTOTYPE)(KEYHANDLE ItemId, BOOL FirstPass, ULONG_PTR Arg);
  238. typedef GROUPITEM_CALLBACK_PROTOTYPE * GROUPITEM_CALLBACK;
  239. typedef enum {
  240. RECURSE_NOT_NEEDED,
  241. RECURSE_SUCCESS,
  242. RECURSE_FAIL
  243. } RECURSERETURN;
  244. //
  245. // Restore callbacks
  246. //
  247. typedef struct _TAG_RESTORE_STRUCT {
  248. PMIG_RESTORECALLBACK RestoreCallback;
  249. //
  250. // Linkage.
  251. //
  252. struct _TAG_RESTORE_STRUCT * Next;
  253. } RESTORE_STRUCT, *PRESTORE_STRUCT;
  254. typedef struct {
  255. PRESTORE_STRUCT RestoreStruct;
  256. PMIG_RESTORECALLBACK RestoreCallback;
  257. } MIG_RESTORECALLBACK_ENUM, *PMIG_RESTORECALLBACK_ENUM;
  258. //
  259. // Globals
  260. //
  261. extern MIG_OBJECTCOUNT g_TotalObjects;
  262. extern MIG_OBJECTCOUNT g_SourceObjects;
  263. extern MIG_OBJECTCOUNT g_DestinationObjects;
  264. extern PCTSTR g_CurrentGroup;
  265. extern HINF g_IsmInf;
  266. extern PMHANDLE g_IsmPool;
  267. extern PMHANDLE g_IsmUntrackedPool;
  268. extern UINT g_IsmCurrentPlatform;
  269. extern UINT g_IsmModulePlatformContext;
  270. extern MIG_ATTRIBUTEID g_PersistentAttributeId;
  271. extern PTRANSPORTDATA g_SelectedTransport;
  272. extern HANDLE g_ActivityEvent;
  273. extern PCTSTR g_JournalDirectory;
  274. extern HANDLE g_JournalHandle;
  275. extern BOOL g_RollbackMode;
  276. extern BOOL g_JournalUsed;
  277. extern HASHTABLE g_ModuleTable;
  278. extern HASHTABLE g_EtmTable;
  279. extern HASHTABLE g_VcmTable;
  280. extern HASHTABLE g_SgmTable;
  281. extern HASHTABLE g_SamTable;
  282. extern HASHTABLE g_DgmTable;
  283. extern HASHTABLE g_DamTable;
  284. extern HASHTABLE g_CsmTable;
  285. extern HASHTABLE g_OpmTable;
  286. extern PMIG_LOGCALLBACK g_LogCallback;
  287. extern HASHTABLE g_TransportTable;
  288. extern BOOL g_ExecutionInProgress;
  289. extern GROWLIST g_AcquireHookList;
  290. extern GROWLIST g_EnumHookList;
  291. extern PPROGRESSBARFN g_ProgressBarFn;
  292. extern MIG_PROGRESSPHASE g_CurrentPhase;
  293. #ifdef PRERELEASE
  294. // crash hooks
  295. extern DWORD g_CrashCountObjects;
  296. extern MIG_OBJECTTYPEID g_CrashNameTypeId;
  297. extern PCTSTR g_CrashNameObject;
  298. #endif
  299. //
  300. // Macro expansion list
  301. //
  302. // None
  303. //
  304. // Macro expansion definition
  305. //
  306. // None
  307. //
  308. // Private function prototypes
  309. //
  310. BOOL
  311. CheckCancel (
  312. VOID
  313. );
  314. MIG_OBJECTTYPEID
  315. FixObjectTypeId (
  316. IN MIG_OBJECTTYPEID ObjectTypeId
  317. );
  318. MIG_OBJECTTYPEID
  319. FixEnumerationObjectTypeId (
  320. IN MIG_OBJECTTYPEID ObjectTypeId
  321. );
  322. BOOL
  323. InitializeTypeMgr (
  324. VOID
  325. );
  326. VOID
  327. TerminateTypeMgr (
  328. VOID
  329. );
  330. BOOL
  331. InitializeEnv (
  332. VOID
  333. );
  334. VOID
  335. TerminateEnv (
  336. VOID
  337. );
  338. BOOL
  339. EnumFirstObjectOfType (
  340. OUT PMIG_TYPEOBJECTENUM EnumPtr,
  341. IN MIG_OBJECTTYPEID TypeId,
  342. IN PCTSTR Pattern,
  343. IN UINT MaxLevel
  344. );
  345. BOOL
  346. EnumNextObjectOfType (
  347. IN OUT PMIG_TYPEOBJECTENUM EnumPtr
  348. );
  349. VOID
  350. AbortObjectOfTypeEnum (
  351. IN OUT PMIG_TYPEOBJECTENUM EnumPtr
  352. );
  353. VOID
  354. AbortCurrentNodeEnum (
  355. IN OUT PMIG_TYPEOBJECTENUM EnumPtr
  356. );
  357. MIG_OBJECTTYPEID
  358. GetObjectTypeId (
  359. IN PCTSTR TypeName
  360. );
  361. PCTSTR
  362. GetObjectTypeName (
  363. IN MIG_OBJECTTYPEID TypeId
  364. );
  365. PCTSTR
  366. GetDecoratedObjectPathFromName (
  367. IN MIG_OBJECTTYPEID ObjectTypeId,
  368. IN PCTSTR ObjectName,
  369. IN BOOL CanContainPattern
  370. );
  371. BOOL
  372. InitializeFlowControl (
  373. VOID
  374. );
  375. VOID
  376. TerminateFlowControl (
  377. VOID
  378. );
  379. BOOL
  380. DoAllObjectEnumerations (
  381. MIG_PROGRESSSLICEID SliceId
  382. );
  383. UINT
  384. EstimateAllObjectEnumerations (
  385. MIG_PROGRESSSLICEID SliceId,
  386. BOOL PreEstimate
  387. );
  388. VOID
  389. AddTypeToGlobalEnumerationEnvironment (
  390. IN MIG_OBJECTTYPEID TypeId
  391. );
  392. BOOL
  393. PrepareEnumerationEnvironment (
  394. IN BOOL GlobalEnvironment
  395. );
  396. BOOL
  397. ClearEnumerationEnvironment (
  398. IN BOOL GlobalEnvironment
  399. );
  400. LONGLONG
  401. AppendProperty (
  402. PCMIG_BLOB Property
  403. );
  404. BOOL
  405. GetProperty (
  406. IN LONGLONG Offset,
  407. IN OUT PGROWBUFFER Buffer, OPTIONAL
  408. OUT PBYTE PreAllocatedBuffer, OPTIONAL
  409. OUT PUINT Size, OPTIONAL
  410. OUT PMIG_BLOBTYPE PropertyDataType OPTIONAL
  411. );
  412. BOOL
  413. CreatePropertyStruct (
  414. OUT PGROWBUFFER Buffer,
  415. OUT PMIG_BLOB PropertyStruct,
  416. IN LONGLONG Offset
  417. );
  418. BOOL
  419. IsObjectLocked (
  420. IN MIG_OBJECTID ObjectId
  421. );
  422. BOOL
  423. IsHandleLocked (
  424. IN MIG_OBJECTID ObjectId,
  425. IN KEYHANDLE Handle
  426. );
  427. BOOL
  428. TestLock (
  429. IN MIG_OBJECTID ObjectId,
  430. IN KEYHANDLE Handle
  431. );
  432. VOID
  433. LockHandle (
  434. IN MIG_OBJECTID ObjectId,
  435. IN KEYHANDLE Handle
  436. );
  437. PCTSTR
  438. GetObjectNameForDebugMsg (
  439. IN MIG_OBJECTID ObjectId
  440. );
  441. BOOL
  442. InitializeOperations (
  443. VOID
  444. );
  445. VOID
  446. TerminateOperations (
  447. VOID
  448. );
  449. BOOL
  450. IsValidCName (
  451. IN PCTSTR Name
  452. );
  453. BOOL
  454. IsValidCNameWithDots (
  455. IN PCTSTR Name
  456. );
  457. BOOL
  458. MarkGroupIds (
  459. IN PCTSTR MemDbKey
  460. );
  461. BOOL
  462. IsGroupId (
  463. IN KEYHANDLE Id
  464. );
  465. BOOL
  466. IsItemId (
  467. IN KEYHANDLE Id
  468. );
  469. VOID
  470. EngineError (
  471. VOID
  472. );
  473. BOOL
  474. ApplyOperationsOnObject (
  475. IN MIG_OBJECTTYPEID ObjectTypeId,
  476. IN MIG_OBJECTSTRINGHANDLE ObjectName,
  477. IN BOOL TreeFiltersOnly,
  478. IN BOOL NoRestoreObject,
  479. IN DWORD OperationPriority,
  480. IN PMIG_CONTENT ApplyInput, OPTIONAL
  481. OUT PMIG_FILTEROUTPUT FilterOutput,
  482. OUT PMIG_CONTENT ApplyOutput OPTIONAL
  483. );
  484. VOID
  485. FreeApplyOutput (
  486. IN PCMIG_CONTENT OriginalContent,
  487. IN PMIG_CONTENT FinalContent
  488. );
  489. VOID
  490. FreeFilterOutput (
  491. IN MIG_OBJECTSTRINGHANDLE OriginalString,
  492. IN PMIG_FILTEROUTPUT FilterOutput
  493. );
  494. KEYHANDLE
  495. GetGroupOfId (
  496. IN KEYHANDLE Handle
  497. );
  498. BOOL
  499. EnumFirstGroupRegistration (
  500. OUT PGROUPREGISTRATION_ENUM EnumPtr,
  501. IN KEYHANDLE GroupId
  502. );
  503. BOOL
  504. EnumNextGroupRegistration (
  505. IN OUT PGROUPREGISTRATION_ENUM EnumPtr
  506. );
  507. VOID
  508. AbortGroupRegistrationEnum (
  509. IN PGROUPREGISTRATION_ENUM EnumPtr
  510. );
  511. BOOL
  512. ValidateModuleName (
  513. IN PCTSTR ModuleName
  514. );
  515. RECURSERETURN
  516. RecurseForGroupItems (
  517. IN KEYHANDLE GroupId,
  518. IN GROUPITEM_CALLBACK Callback,
  519. IN ULONG_PTR Arg,
  520. IN BOOL ExecuteOnly,
  521. IN BOOL LogicalOrOnResults
  522. );
  523. BOOL
  524. InitializeProperties (
  525. IN MIG_PLATFORMTYPEID Platform,
  526. IN BOOL VcmMode
  527. );
  528. VOID
  529. TerminateProperties (
  530. IN MIG_PLATFORMTYPEID Platform
  531. );
  532. LONGLONG
  533. OffsetFromPropertyDataId (
  534. IN MIG_PROPERTYDATAID PropertyDataId
  535. );
  536. BOOL
  537. DbEnumFillStruct (
  538. IN MIG_OBJECTTYPEID ObjectTypeId,
  539. IN PCTSTR Pattern,
  540. OUT PDBENUM_ARGS Args
  541. );
  542. VOID
  543. DbEnumFreeStruct (
  544. IN PDBENUM_ARGS Args
  545. );
  546. BOOL
  547. DbEnumFind (
  548. IN PCWSTR KeySegment
  549. );
  550. BOOL
  551. DbEnumMatch (
  552. IN PCVOID InboundArgs,
  553. IN PCWSTR KeySegment
  554. );
  555. BOOL
  556. DbEnumFirst (
  557. IN MIG_OBJECTTYPEID ObjectTypeId,
  558. OUT PMEMDB_ENUM EnumPtr,
  559. IN PCTSTR PatternString,
  560. OUT PDBENUM_ARGS ArgsStruct
  561. );
  562. VOID
  563. EnvInvalidateCallbacks (
  564. VOID
  565. );
  566. BOOL
  567. EnvSaveEnvironment (
  568. IN OUT PGROWLIST GrowList
  569. );
  570. BOOL
  571. EnvRestoreEnvironment (
  572. IN PGROWLIST GrowList
  573. );
  574. PTSTR
  575. GetFirstSeg (
  576. IN PCTSTR SrcFileName
  577. );
  578. MIG_OBJECTID
  579. GetObjectIdForModification (
  580. IN MIG_OBJECTTYPEID ObjectTypeId,
  581. IN ENCODEDSTRHANDLE EncodedObjectName
  582. );
  583. BOOL
  584. RestoreObject (
  585. IN MIG_OBJECTTYPEID ObjectTypeId,
  586. IN ENCODEDSTRHANDLE ObjectName,
  587. OUT MIG_COMPARERESULT *Compare, OPTIONAL
  588. IN DWORD OperationPriority,
  589. OUT PBOOL DeleteFailed
  590. );
  591. BOOL
  592. RegisterInternalAttributes (
  593. VOID
  594. );
  595. BOOL
  596. EnumFirstRestoreCallback (
  597. OUT PMIG_RESTORECALLBACK_ENUM RestoreCallbackEnum
  598. );
  599. BOOL
  600. EnumNextRestoreCallback (
  601. OUT PMIG_RESTORECALLBACK_ENUM RestoreCallbackEnum
  602. );
  603. BOOL
  604. ShouldObjectBeRestored (
  605. IN MIG_OBJECTTYPEID ObjectTypeId,
  606. IN MIG_OBJECTID ObjectId,
  607. IN MIG_OBJECTSTRINGHANDLE ObjectName
  608. );
  609. VOID
  610. InitRegistryType (
  611. VOID
  612. );
  613. VOID
  614. DoneRegistryType (
  615. VOID
  616. );
  617. VOID
  618. InitFileType (
  619. VOID
  620. );
  621. VOID
  622. DoneFileType (
  623. VOID
  624. );
  625. VOID
  626. InitDataType (
  627. VOID
  628. );
  629. VOID
  630. DoneDataType (
  631. VOID
  632. );
  633. BOOL
  634. DataTypeAddObject (
  635. IN MIG_OBJECTSTRINGHANDLE ObjectName,
  636. IN PCTSTR ObjectLocation,
  637. IN BOOL MakePersistent
  638. );
  639. BOOL
  640. CanObjectTypeBeRestored (
  641. IN MIG_OBJECTTYPEID ObjectTypeId
  642. );
  643. BOOL
  644. CanObjectTypeBeModified (
  645. IN MIG_OBJECTTYPEID ObjectTypeId
  646. );
  647. VOID
  648. TypeMgrRescanTypes (
  649. VOID
  650. );
  651. HASHTABLE
  652. GetTypeExclusionTable (
  653. IN MIG_OBJECTTYPEID ObjectTypeId
  654. );
  655. BOOL
  656. EnumFirstPhysicalObject (
  657. OUT PMIG_OBJECT_ENUM ObjectEnum,
  658. IN MIG_OBJECTTYPEID ObjectTypeId,
  659. IN MIG_OBJECTSTRINGHANDLE ObjectPattern
  660. );
  661. BOOL
  662. EnumNextPhysicalObject (
  663. IN OUT PMIG_OBJECT_ENUM ObjectEnum
  664. );
  665. VOID
  666. AbortPhysicalObjectEnum (
  667. IN PMIG_OBJECT_ENUM ObjectEnum
  668. );
  669. BOOL
  670. IncrementTotalObjectCount (
  671. IN MIG_OBJECTTYPEID ObjectTypeId
  672. );
  673. BOOL
  674. IncrementPersistentObjectCount (
  675. IN MIG_OBJECTTYPEID ObjectTypeId
  676. );
  677. BOOL
  678. DecrementPersistentObjectCount (
  679. IN MIG_OBJECTTYPEID ObjectTypeId
  680. );
  681. BOOL
  682. IncrementApplyObjectCount (
  683. IN MIG_OBJECTTYPEID ObjectTypeId
  684. );
  685. BOOL
  686. DecrementApplyObjectCount (
  687. IN MIG_OBJECTTYPEID ObjectTypeId
  688. );
  689. PMIG_OBJECTCOUNT
  690. GetTypeObjectsStatistics (
  691. IN MIG_OBJECTTYPEID ObjectTypeId
  692. );
  693. BOOL
  694. SavePerObjectStatistics (
  695. VOID
  696. );
  697. BOOL
  698. LoadPerObjectStatistics (
  699. VOID
  700. );
  701. BOOL
  702. EnvEnumerateFirstEntry (
  703. OUT PENV_ENTRY_ENUM EnvEntryEnum,
  704. IN MIG_PLATFORMTYPEID Platform,
  705. IN PCTSTR Pattern
  706. );
  707. BOOL
  708. EnvEnumerateNextEntry (
  709. IN OUT PENV_ENTRY_ENUM EnvEntryEnum
  710. );
  711. VOID
  712. AbortEnvEnumerateEntry (
  713. IN OUT PENV_ENTRY_ENUM EnvEntryEnum
  714. );
  715. PTEMPORARYPROFILE
  716. OpenTemporaryProfile (
  717. IN PCTSTR UserName,
  718. IN PCTSTR Domain
  719. );
  720. BOOL
  721. SelectTemporaryProfile (
  722. IN PTEMPORARYPROFILE Profile
  723. );
  724. BOOL
  725. CloseTemporaryProfile (
  726. IN PTEMPORARYPROFILE Profile,
  727. IN BOOL MakeProfilePermanent
  728. );
  729. BOOL
  730. MapUserProfile (
  731. IN PCTSTR UserStringSid,
  732. IN PCTSTR UserProfilePath
  733. );
  734. BOOL
  735. UnmapUserProfile (
  736. IN PCTSTR UserStringSid
  737. );
  738. BOOL
  739. DeleteUserProfile (
  740. IN PCTSTR UserStringSid,
  741. IN PCTSTR UserProfilePath
  742. );
  743. PCURRENT_USER_DATA
  744. GetCurrentUserData (
  745. VOID
  746. );
  747. VOID
  748. FreeCurrentUserData (
  749. IN PCURRENT_USER_DATA CurrentUserData
  750. );
  751. BOOL
  752. ExecuteDelayedOperations (
  753. IN BOOL CleanupOnly
  754. );
  755. //
  756. // modules.c
  757. //
  758. BOOL
  759. InitializeVcmModules (
  760. IN PVOID Reserved
  761. );
  762. BOOL
  763. InitializeModules (
  764. IN MIG_PLATFORMTYPEID Platform,
  765. IN PVOID Reserved
  766. );
  767. BOOL
  768. BroadcastUserCreation (
  769. IN PTEMPORARYPROFILE UserProfile
  770. );
  771. VOID
  772. TerminateModules (
  773. VOID
  774. );
  775. VOID
  776. TerminateProcessWideModules (
  777. VOID
  778. );
  779. BOOL
  780. ExecutePhysicalAcquireCallbacks (
  781. IN MIG_OBJECTTYPEID ObjectTypeId,
  782. IN MIG_OBJECTSTRINGHANDLE ObjectName,
  783. IN PMIG_CONTENT Content,
  784. IN MIG_CONTENTTYPE ContentType,
  785. IN UINT MemoryContentLimit,
  786. OUT PMIG_CONTENT *NewContent
  787. );
  788. BOOL
  789. FreeViaAcquirePhysicalCallback (
  790. IN PMIG_CONTENT Content
  791. );
  792. BOOL
  793. ExecutePhysicalEnumCheckCallbacks (
  794. IN PMIG_TYPEOBJECTENUM ObjectEnum
  795. );
  796. BOOL
  797. ExecutePhysicalEnumAddCallbacks (
  798. IN OUT PMIG_TYPEOBJECTENUM ObjectEnum,
  799. IN MIG_OBJECTSTRINGHANDLE Pattern,
  800. IN MIG_PARSEDPATTERN ParsedPattern,
  801. IN OUT PUINT CurrentCallback
  802. );
  803. VOID
  804. AbortPhysicalEnumCallback (
  805. IN PMIG_TYPEOBJECTENUM ObjectEnum, ZEROED
  806. IN UINT CurrentCallback
  807. );
  808. #ifdef PRERELEASE
  809. VOID
  810. LoadCrashHooks (
  811. VOID
  812. );
  813. #endif
  814. //
  815. // ANSI/UNICODE Macros
  816. //
  817. // None