home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sysmgmt / setup / win9xmig / scrnsave / miginf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-13  |  2.4 KB  |  72 lines

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