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.4 KiB

  1. typedef enum
  2. {
  3. dbNormal, // Non-Exchange
  4. dbISPriv,
  5. dbISPub,
  6. dbDS
  7. } EXCHANGEDB;
  8. typedef struct tagUTILOPTS
  9. {
  10. char *szSourceDB;
  11. char *szLogfilePath;
  12. char *szSystemPath;
  13. char *szTempDB;
  14. char *szBackup;
  15. char *szRestore;
  16. void *pv; // Points to mode-specific structures.
  17. INT mode;
  18. INT fUTILOPTSFlags;
  19. BOOL fUseRegistry;
  20. long cpageBuffers;
  21. long cpageBatchIO;
  22. long cpageDbExtension;
  23. EXCHANGEDB db; // Exchange-specific flag.
  24. }
  25. UTILOPTS;
  26. // Modes:
  27. #define modeConsistency 1
  28. #define modeDefragment 2
  29. #define modeRecovery 3
  30. #define modeBackup 4
  31. #define modeUpgrade 5
  32. #define modeDump 6
  33. // Flags:
  34. #define fUTILOPTSSuppressLogo 0x00000001
  35. #define fUTILOPTSDefragRepair 0x00000002 // Defrag mode only.
  36. #define fUTILOPTSPreserveTempDB 0x00000004 // Defrag and upgrade modes.
  37. #define fUTILOPTSDefragInfo 0x00000008 // Defrag and upgrade modes.
  38. #define fUTILOPTSIncrBackup 0x00000010 // Backup only.
  39. #define FUTILOPTSSuppressLogo( fFlags ) ( (fFlags) & fUTILOPTSSuppressLogo )
  40. #define UTILOPTSSetSuppressLogo( fFlags ) ( (fFlags) |= fUTILOPTSSuppressLogo )
  41. #define UTILOPTSResetSuppressLogo( fFlags ) ( (fFlags) &= ~fUTILOPTSSuppressLogo )
  42. #define FUTILOPTSDefragRepair( fFlags ) ( (fFlags) & fUTILOPTSDefragRepair )
  43. #define UTILOPTSSetDefragRepair( fFlags ) ( (fFlags) |= fUTILOPTSDefragRepair )
  44. #define UTILOPTSResetDefragRepair( fFlags ) ( (fFlags) &= ~fUTILOPTSDefragRepair )
  45. #define FUTILOPTSPreserveTempDB( fFlags ) ( (fFlags) & fUTILOPTSPreserveTempDB )
  46. #define UTILOPTSSetPreserveTempDB( fFlags ) ( (fFlags) |= fUTILOPTSPreserveTempDB )
  47. #define UTILOPTSResetPreserveTempDB( fFlags ) ( (fFlags) &= ~fUTILOPTSPreserveTempDB )
  48. #define FUTILOPTSDefragInfo( fFlags ) ( (fFlags) & fUTILOPTSDefragInfo )
  49. #define UTILOPTSSetDefragInfo( fFlags ) ( (fFlags) |= fUTILOPTSDefragInfo )
  50. #define UTILOPTSResetDefragInfo( fFlags ) ( (fFlags) &= ~fUTILOPTSDefragInfo )
  51. #define FUTILOPTSIncrBackup( fFlags ) ( (fFlags) & fUTILOPTSIncrBackup )
  52. #define UTILOPTSSetIncrBackup( fFlags ) ( (fFlags) |= fUTILOPTSIncrBackup )
  53. #define UTILOPTSResetIncrBackup( fFlags ) ( (fFlags) &= ~fUTILOPTSIncrBackup )
  54. #define CallJ( func, label ) {if ((err = (func)) < 0) {goto label;}}
  55. #define Call( func ) CallJ( func, HandleError )
  56. #define fFalse 0
  57. #define fTrue 1