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.

72 lines
2.3 KiB

  1. //+------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1996, Microsoft Corporation
  4. //
  5. // File: RECOVER.HXX
  6. //
  7. // Contents: It contains basic definition for DFS Manager Recover test
  8. // hooks
  9. //
  10. // Synoposis:
  11. //
  12. // Classes:
  13. //
  14. // Functions:
  15. //
  16. // History: February 22, 1992 AlokS Created
  17. //
  18. //-------------------------------------------------------------------
  19. #ifndef __RECOVER_HXX__
  20. #define __RECOVER_HXX__
  21. #if (DBG == 1) || (_CT_TEST_HOOK == 1)
  22. #include "dfsmrshl.h"
  23. //
  24. // Currently, the longest API name is SetVolumeState, which is 14 chars long.
  25. // If a longer interface comes along, increase the size of the buffer
  26. // accordingly
  27. //
  28. typedef struct _RECOVERY_BREAK_POINT
  29. {
  30. ULONG BreakPt;
  31. PWSTR pwszApiBreak;
  32. } RECOVERY_BREAK_POINT, *PRECOVERY_BREAK_POINT;
  33. extern RECOVERY_BREAK_POINT gRecoveryBkptInfo;
  34. //
  35. // This macro will cause the active process to terminate it the current api
  36. // and check point match those that should cause a failure
  37. //
  38. #define RECOVERY_TEST_POINT(pwzapi, checkpt) \
  39. if (checkpt == gRecoveryBkptInfo.BreakPt && \
  40. _wcsicmp(pwzapi, gRecoveryBkptInfo.pwszApiBreak) == 0) { \
  41. \
  42. ExitProcess(ERROR_PROCESS_ABORTED); \
  43. \
  44. }
  45. extern MARSHAL_INFO MiRecoveryBkpt;
  46. #define INIT_RECOVERY_BREAK_INFO() \
  47. static MARSHAL_TYPE_INFO _MCode_RecoveryBreak[] = { \
  48. _MCode_ul(RECOVERY_BREAK_POINT, BreakPt), \
  49. _MCode_pwstr(RECOVERY_BREAK_POINT, pwszApiBreak) \
  50. }; \
  51. MARSHAL_INFO MiRecoveryBkpt = \
  52. _mkMarshalInfo(RECOVERY_BREAK_POINT, _MCode_RecoveryBreak);
  53. //
  54. // This function will get the information needed from the passed in buffer
  55. //
  56. NTSTATUS DfsSetRecoveryBreakPoint(PBYTE pBuffer, ULONG cbSize);
  57. #else
  58. #define RECOVERY_TEST_POINT(pwzapi, checkpt)
  59. #endif
  60. #endif // __RECOVER_HXX__