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.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1996.
  5. //
  6. // File: ole.hxx
  7. //
  8. // Contents: OLE Project Header File
  9. //
  10. //----------------------------------------------------------------------------
  11. #ifndef __OLE_HXX__
  12. #define __OLE_HXX__
  13. #include "error.hxx"
  14. #define olErr(l, e) ErrJmp(ol, l, e, sc)
  15. #define olChkTo(l, e) if (FAILED(sc = (e))) olErr(l, sc) else 1
  16. #define olHChkTo(l, e) if (FAILED(sc = DfGetScode(e))) olErr(l, sc) else 1
  17. #define olChk(e) olChkTo(EH_Err, e)
  18. #define olHChk(e) olHChkTo(EH_Err, e)
  19. #define olMemTo(l, e) \
  20. if ((e) == NULL) olErr(l, STG_E_INSUFFICIENTMEMORY) else 1
  21. #define olMem(e) olMemTo(EH_Err, e)
  22. #include "ref.hxx"
  23. #if DEVL == 1
  24. DECLARE_DEBUG(ol);
  25. #endif
  26. #define SAFE_DREF(x) \
  27. ((x)? (*x) : NULL)
  28. #if DBG == 1
  29. #define olDebugOut(x) olInlineDebugOut x
  30. #include <assert.h>
  31. #define olAssert(e) assert(e)
  32. #define olVerify(e) assert(e)
  33. #define olAssSucc(e) assert(SUCCEEDED(e))
  34. #define olVerSucc(e) assert(SUCCEEDED(e))
  35. #define olHVerSucc(e) assert(SUCCEEDED(DfGetScode(e)))
  36. #else
  37. #define olDebugOut(x)
  38. #define olAssert(e)
  39. #define olVerify(e) (e)
  40. #define olAssSucc(e)
  41. #define olVerSucc(e) (e)
  42. #define olHVerSucc(e) (e)
  43. #endif
  44. #define olLog(x)
  45. #define FreeLogFile() S_OK
  46. #endif