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.

60 lines
1.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: astg.hxx
  7. //
  8. // Contents: Common header file for async docfiles
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 19-Dec-95 PhilipLa Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __ASTG_HXX__
  18. #define __ASTG_HXX__
  19. #if DBG == 1
  20. DECLARE_DEBUG(astg);
  21. #endif
  22. #if DBG == 1
  23. #define astgDebugOut(x) astgInlineDebugOut x
  24. #ifndef REF
  25. #define astgAssert(e) Win4Assert(e)
  26. #define astgVerify(e) Win4Assert(e)
  27. #else
  28. #include <assert.h>
  29. #define astgAssert(e) assert(e)
  30. #define astgVerify(e) assert(e)
  31. #endif //!REF
  32. #else
  33. #define astgDebugOut(x)
  34. #define astgAssert(e)
  35. #define astgVerify(e) (e)
  36. #endif
  37. #define astgErr(l, e) ErrJmp(astg, l, e, sc)
  38. #define astgChkTo(l, e) if (FAILED(sc = (e))) astgErr(l, sc) else 1
  39. #define astgHChkTo(l, e) if (FAILED(sc = GetScode(e))) astgErr(l, sc) else 1
  40. #define astgChk(e) astgChkTo(Err, e)
  41. #define astgHChk(e) astgHChkTo(Err, e)
  42. #define astgMemTo(l, e) if ((e) == NULL) astgErr(l, STG_E_INSUFFICIENTMEMORY) else 1
  43. #define astgMem(e) astgMemTo(Err, e)
  44. #ifndef ASYNC
  45. #define UNTERMINATED 0
  46. #define TERMINATED_NORMAL 1
  47. #define TERMINATED_ABNORMAL 2
  48. #endif
  49. #endif // #ifndef __ASTG_HXX__