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.

72 lines
2.4 KiB

  1. #ifndef MIGINF_H
  2. #define MIGINF_H
  3. #define SECTION_MIGRATIONPATHS "Migration Paths"
  4. #define SECTION_EXCLUDEDPATHS "Excluded Paths"
  5. #define SECTION_HANDLED "Handled"
  6. #define SECTION_MOVED "Moved"
  7. #define SECTION_INCOMPATIBLE "Incompatible Messages"
  8. #define SECTION_DISKSPACEUSED "NT Disk Space Requirements"
  9. typedef enum {
  10. MIG_FIRSTTYPE,
  11. MIG_FILE,
  12. MIG_PATH,
  13. MIG_REGKEY,
  14. MIG_MESSAGE,
  15. MIG_LASTTYPE
  16. } MIGTYPE, *PMIGTYPE;
  17. typedef struct tagMIGINFSECTIONENUM {
  18. PCSTR Key;
  19. PCSTR Value;
  20. PVOID EnumKey; // Internal.
  21. } MIGINFSECTIONENUM, * PMIGINFSECTIONENUM;
  22. BOOL MigInf_Initialize (VOID);
  23. VOID MigInf_CleanUp (VOID);
  24. BOOL MigInf_PathIsExcluded (IN PCSTR Path);
  25. BOOL MigInf_FirstInSection(IN PCSTR SectionName, OUT PMIGINFSECTIONENUM Enum);
  26. BOOL MigInf_NextInSection(IN OUT PMIGINFSECTIONENUM Enum);
  27. BOOL MigInf_AddObject (IN MIGTYPE ObjectType,IN PCSTR SectionString,IN PCSTR ParamOne,IN PCSTR ParamTwo);
  28. BOOL MigInf_WriteInfToDisk (VOID);
  29. BOOL MigInf_UseSpace (IN PCSTR DriveRoot,IN LONGLONG Space);
  30. //
  31. // Macros for common miginf actions.
  32. //
  33. //
  34. // Adding Objects.
  35. //
  36. #define MigInf_AddHandledFile(file) MigInf_AddObject(MIGTYPE_FILE,SECTION_HANDLED,(file),NULL)
  37. #define MigInf_AddHandledDirectory(directory) MigInf_AddObject(MIGTYPE_PATH,SECTION_HANDLED,(directory),NULL)
  38. #define MigInf_AddHandledRegistry(key,value) MigInf_AddObject(MIGTYPE_REGKEY,SECTION_HANDLED,(key),(value))
  39. #define MigInf_AddMovedFile(from,to) MigInf_AddObject(MIGTYPE_FILE,SECTION_MOVED,(from),(to))
  40. #define MigInf_AddMovedDirectory(from,to) MigInf_AddObject(MIGTYPE_PATH,SECTION_MOVED,(from),(to))
  41. #define MigInf_AddMessage(msgSection,msg) MigInf_AddObject(MIGTYPE_MESSAGE,SECTION_INCOMPATIBLE,(msgSection),(msg))
  42. #define MigInf_AddMessageFile(msgSection,file) MigInf_AddObject(MIGTYPE_FILE,(msgSection),(file),NULL)
  43. #define MigInf_AddMessageDirectory(msgSection,directory) MigInf_AddObject(MIGTYPE_PATH,(msgSection,(directory),NULL)
  44. #define MigInf_AddMessageRegistry(msgSection,key,value) MigInf_AddObject(MIGTYPE_REGKEY,(msgSection),(key),(value))
  45. //
  46. // Enumerating Sections
  47. //
  48. #define MigInf_GetFirstMigrationPath(Enum) MigInf_FirstInSection(SECTION_MIGRATIONPATHS,(Enum))
  49. #define MigInf_GetFirstExcludedPath(Enum) MigInf_FirstInSection(SECTION_EXCLUDEDPATHS,(Enum))
  50. #endif