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.

72 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: layouter.hxx
  7. //
  8. // Contents: Error codes for layout tool
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 12-Feb-96 PhilipLa Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __LAYOUTER_HXX__
  18. #define __LAYOUTER_HXX__
  19. #ifndef STGTY_REPEAT
  20. #define STGTY_REPEAT 100
  21. #endif
  22. #ifndef STG_TOEND
  23. #define STG_TOEND -1
  24. #endif
  25. #ifndef STG_S_FILEEMPTY
  26. #define STG_S_FILEEMPTY _HRESULT_TYPEDEF_(0x00030204L)
  27. #endif
  28. #define WIN32_SCODE(err) HRESULT_FROM_WIN32(err)
  29. #define LAST_STG_SCODE Win32ErrorToScode(GetLastError())
  30. #if DBG == 1
  31. DECLARE_DEBUG(lay);
  32. #define layDebugOut(x) layInlineDebugOut x
  33. #define layAssert(e) Win4Assert(e)
  34. #define layVerify(e) Win4Assert(e)
  35. #else
  36. #define layDebugOut(x)
  37. #define layAssert(e)
  38. #define layVerify(e) (e)
  39. #endif
  40. #define layErr(l, e) ErrJmp(lay, l, e, sc)
  41. #define layChkTo(l, e) if (FAILED(sc = (e))) layErr(l, sc) else 1
  42. #define layHChkTo(l, e) if (FAILED(sc = GetScode(e))) layErr(l, sc) else 1
  43. #define layChk(e) layChkTo(Err, e)
  44. #define layHChk(e) layHChkTo(Err, e)
  45. #define layMemTo(l, e) if ((e) == NULL) layErr(l, STG_E_INSUFFICIENTMEMORY) else 1
  46. #define layMem(e) layMemTo(Err, e)
  47. #define boolChk(e) \
  48. if (!(e)) layErr(Err, LAST_STG_SCODE) else 1
  49. #define boolChkTo(l, e) \
  50. if (!(e)) layErr(l, LAST_STG_SCODE) else 1
  51. #define negChk(e) \
  52. if ((e) == 0xffffffff) layErr(Err, LAST_STG_SCODE) else 1
  53. #define negChkTo(l, e) \
  54. if ((e) == 0xffffffff) layErr(l, LAST_STG_SCODE) else 1
  55. #endif // #ifndef __LAYOUTER_HXX__