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.

111 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. recovery.h
  5. Abstract:
  6. A number of utilities for safe/recovery mode
  7. Author:
  8. Calin Negreanu (calinn) 6-Aug-1999
  9. Revision History:
  10. --*/
  11. #pragma once
  12. // posible values for safe mode identifiers
  13. typedef enum {
  14. SAFEMODEID_FIRST,
  15. SAFEMODEID_DRIVE,
  16. SAFEMODEID_FILES,
  17. SAFEMODEID_LNK9X,
  18. SAFEMODEID_LAST
  19. } SAFEMODE_OPTIONS;
  20. BOOL
  21. SafeModeInitializeA (
  22. BOOL Forced
  23. );
  24. BOOL
  25. SafeModeInitializeW (
  26. BOOL Forced
  27. );
  28. BOOL
  29. SafeModeShutDownA (
  30. VOID
  31. );
  32. BOOL
  33. SafeModeShutDownW (
  34. VOID
  35. );
  36. BOOL
  37. SafeModeRegisterActionA (
  38. IN ULONG Id,
  39. IN PCSTR String
  40. );
  41. BOOL
  42. SafeModeRegisterActionW (
  43. IN ULONG Id,
  44. IN PCWSTR String
  45. );
  46. BOOL
  47. SafeModeUnregisterActionA (
  48. VOID
  49. );
  50. BOOL
  51. SafeModeUnregisterActionW (
  52. VOID
  53. );
  54. BOOL
  55. SafeModeActionCrashedA (
  56. IN ULONG Id,
  57. IN PCSTR String
  58. );
  59. BOOL
  60. SafeModeActionCrashedW (
  61. IN ULONG Id,
  62. IN PCWSTR String
  63. );
  64. VOID
  65. SafeModeExceptionOccured (
  66. VOID
  67. );
  68. #ifdef UNICODE
  69. #define SafeModeInitialize SafeModeInitializeW
  70. #define SafeModeShutDown SafeModeShutDownW
  71. #define SafeModeRegisterAction SafeModeRegisterActionW
  72. #define SafeModeUnregisterAction SafeModeUnregisterActionW
  73. #define SafeModeActionCrashed SafeModeActionCrashedW
  74. #else
  75. #define SafeModeInitialize SafeModeInitializeA
  76. #define SafeModeShutDown SafeModeShutDownA
  77. #define SafeModeRegisterAction SafeModeRegisterActionA
  78. #define SafeModeUnregisterAction SafeModeUnregisterActionA
  79. #define SafeModeActionCrashed SafeModeActionCrashedA
  80. #endif
  81. #define SAFEMODE_GUARD(id,str) if(!SafeModeActionCrashed(id,str)){SafeModeRegisterAction(id,str);
  82. #define END_SAFEMODE_GUARD SafeModeUnregisterAction();}