Leaked source code of windows server 2003
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.5 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. typedef enum {
  9. MIG_FIRSTTYPE,
  10. MIG_FILE,
  11. MIG_PATH,
  12. MIG_REGKEY,
  13. MIG_MESSAGE,
  14. MIG_LASTTYPE
  15. } MIGTYPE, *PMIGTYPE;
  16. typedef struct tagMIGINFSECTIONENUM {
  17. PCSTR Key;
  18. PCSTR Value;
  19. PVOID EnumKey; // Internal.
  20. } MIGINFSECTIONENUM, * PMIGINFSECTIONENUM;
  21. BOOL IsUpgradeTargetSupportIIS(LPCSTR szMyAnswerFile);
  22. BOOL WINAPI MigInf_Initialize (VOID);
  23. VOID WINAPI MigInf_CleanUp (VOID);
  24. BOOL WINAPI MigInf_PathIsExcluded (IN PCSTR Path);
  25. BOOL WINAPI MigInf_FirstInSection(IN PCSTR SectionName, OUT PMIGINFSECTIONENUM Enum);
  26. BOOL WINAPI MigInf_NextInSection(IN OUT PMIGINFSECTIONENUM Enum);
  27. BOOL WINAPI MigInf_AddObject (IN MIGTYPE ObjectType,IN PCSTR SectionString,IN PCSTR ParamOne,IN PCSTR ParamTwo);
  28. BOOL WINAPI MigInf_WriteInfToDisk (VOID);
  29. PCSTR WINAPI MigInf_GetNewSectionName (VOID);
  30. //
  31. // Macros for common miginf actions.
  32. //
  33. //
  34. // Adding Objects.
  35. //
  36. #define MigInf_AddHandledFile(file) MigInf_AddObject(MIG_FILE,SECTION_HANDLED,(file),NULL)
  37. #define MigInf_AddHandledDirectory(directory) MigInf_AddObject(MIG_PATH,SECTION_HANDLED,(directory),NULL)
  38. #define MigInf_AddHandledRegistry(key,value) MigInf_AddObject(MIG_REGKEY,SECTION_HANDLED,(key),(value))
  39. #define MigInf_AddMovedFile(from,to) MigInf_AddObject(MIG_FILE,SECTION_MOVED,(from),(to))
  40. #define MigInf_AddMovedDirectory(from,to) MigInf_AddObject(MIG_PATH,SECTION_MOVED,(from),(to))
  41. #define MigInf_AddMessage(msgSection,msg) MigInf_AddObject(MIG_MESSAGE,SECTION_INCOMPATIBLE,(msgSection),(msg))
  42. #define MigInf_AddMessageFile(msgSection,file) MigInf_AddObject(MIG_FILE,(msgSection),(file),NULL)
  43. #define MigInf_AddMessageDirectory(msgSection,directory) MigInf_AddObject(MIG_PATH,(msgSection,(directory),NULL)
  44. #define MigInf_AddMessageRegistry(msgSection,key,value) MigInf_AddObject(MIG_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