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.

154 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spdr.h
  5. Abstract:
  6. Header file for Automated System Recovery functions in text-mode setup.
  7. Author:
  8. Michael Peterson (v-michpe) 13-May-1997
  9. Guhan Suriyanarayanan (guhans) 21-Aug-1999
  10. Revision History:
  11. 13-May-1997 v-michpe Created file
  12. 21-Aug-1999 guhans Clean-up
  13. --*/
  14. #ifndef _SPDR_DEFN_
  15. #define _SPDR_DEFN_
  16. typedef enum _ASRMODE {
  17. ASRMODE_NONE = 0,
  18. ASRMODE_NORMAL,
  19. ASRMODE_QUICKTEST_TEXT,
  20. ASRMODE_QUICKTEST_FULL
  21. } ASRMODE;
  22. //
  23. // Returns the current ASR (Automated System Recovery) mode
  24. //
  25. ASRMODE
  26. SpAsrGetAsrMode(VOID);
  27. //
  28. // Sets the current ASR mode
  29. //
  30. ASRMODE
  31. SpAsrSetAsrMode(
  32. IN CONST ASRMODE NewAsrMode
  33. );
  34. //
  35. // Returns TRUE if we're in any of the ASR modes other than ASRMODE_NONE.
  36. //
  37. BOOLEAN
  38. SpDrEnabled(VOID);
  39. //
  40. // Returns TRUE if we're in any of the ASR QuickTest modes.
  41. //
  42. BOOLEAN
  43. SpAsrIsQuickTest(VOID);
  44. //
  45. // Returns TRUE if the user is doing a fast repair
  46. //
  47. BOOLEAN
  48. SpDrIsRepairFast(VOID);
  49. //
  50. // Set or reset the fast-repair flag
  51. //
  52. BOOLEAN
  53. SpDrSetRepairFast(BOOLEAN Value);
  54. //
  55. // Returns the Boot directory
  56. //
  57. PWSTR
  58. SpDrGetNtDirectory(VOID);
  59. PWSTR
  60. SpDrGetNtErDirectory(VOID);
  61. //
  62. // Copies the recovery device drivers (e.g., tape drivers) specified
  63. // in the asr.sif file. If no device drivers are specified, nothing gets
  64. // copied. Source media can be Floppy or CDROM.
  65. //
  66. // Also copies asr.sif from the ASR floppy to the %windir%\repair
  67. // directory.
  68. //
  69. NTSTATUS
  70. SpDrCopyFiles(VOID);
  71. PWSTR
  72. SpDrGetSystemPartitionDirectory(VOID);
  73. //
  74. // Cleanup. This function removes the "InProgress" flag.
  75. //
  76. VOID
  77. SpDrCleanup(VOID);
  78. //
  79. // This is the main ASR / ER entry point.
  80. //
  81. //
  82. NTSTATUS
  83. SpDrPtPrepareDisks(
  84. IN PVOID SifHandle,
  85. OUT PDISK_REGION *NtPartitionRegion,
  86. OUT PDISK_REGION *LoaderPartitionRegion,
  87. IN PWSTR SetupSourceDevicePath,
  88. IN PWSTR DirectoryOnSetupSource,
  89. OUT BOOLEAN *RepairedNt);
  90. BOOLEAN
  91. SpDoRepair(
  92. IN PVOID SifHandle,
  93. IN PWSTR Local_SetupSourceDevicePath,
  94. IN PWSTR Local_DirectoryOnSetupSource,
  95. IN PWSTR AutoSourceDevicePath,
  96. IN PWSTR AutoDirectoryOnSetupSource,
  97. IN PWSTR RepairPath,
  98. IN PULONG RepairOptions
  99. );
  100. NTSTATUS
  101. SpDrSetEnvironmentVariables(HANDLE *HiveRootKeys);
  102. extern BOOLEAN DisableER;
  103. __inline
  104. BOOLEAN
  105. SpIsERDisabled(
  106. VOID
  107. )
  108. {
  109. return DisableER;
  110. }
  111. __inline
  112. VOID
  113. SpSetERDisabled(
  114. IN BOOLEAN Disable
  115. )
  116. {
  117. DisableER = Disable;
  118. }
  119. #endif