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.

59 lines
1.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: ole.hxx
  7. //
  8. // Contents: OLE Project Header File
  9. //
  10. // History: 19-Sep-91 DrewB Created.
  11. // 10-Feb-92 DrewB Updated debugging definitions
  12. // 13-Mar-92 DrewB Added olVerify, INDINST
  13. // 19-Mar-92 DrewB Added olErr
  14. //
  15. //----------------------------------------------------------------------------
  16. #ifndef __OLE_HXX__
  17. #define __OLE_HXX__
  18. #include <error.hxx>
  19. #define olErr(l, e) ErrJmp(ol, l, e, sc)
  20. #define olChkTo(l, e) if (FAILED(sc = (e))) olErr(l, sc) else 1
  21. #define olHChkTo(l, e) if (FAILED(sc = DfGetScode(e))) olErr(l, sc) else 1
  22. #define olChk(e) olChkTo(EH_Err, e)
  23. #define olHChk(e) olHChkTo(EH_Err, e)
  24. #define olMemTo(l, e) \
  25. if ((e) == NULL) olErr(l, STG_E_INSUFFICIENTMEMORY) else 1
  26. #define olMem(e) olMemTo(EH_Err, e)
  27. #include <debnot.h>
  28. #if DBG == 1
  29. DECLARE_DEBUG(ol);
  30. #endif
  31. #if DBG == 1
  32. #define olDebugOut(x) olInlineDebugOut x
  33. #define olAssert(e) Win4Assert(e)
  34. #define olVerify(e) Win4Assert(e)
  35. #define olAssSucc(e) Win4Assert(SUCCEEDED(e))
  36. #define olVerSucc(e) Win4Assert(SUCCEEDED(e))
  37. #define olHVerSucc(e) Win4Assert(SUCCEEDED(DfGetScode(e)))
  38. #else
  39. #define olDebugOut(x)
  40. #define olAssert(e)
  41. #define olVerify(e) (void)(e)
  42. #define olAssSucc(e)
  43. #define olVerSucc(e) (e)
  44. #define olHVerSucc(e) (e)
  45. #endif
  46. #endif