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.

52 lines
1.1 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. vseeport.h
  5. Abstract:
  6. for porting code from vsee
  7. Author:
  8. Jay Krell (JayKrell) August 2001
  9. Revision History:
  10. --*/
  11. #include "fusionbuffer.h"
  12. #include "lhport.h"
  13. #define VsVerifyThrow(a,b) (a)
  14. #define VsVerify(a,b) (a)
  15. #define VSEE_NO_THROW() /* nothing */
  16. #define VSEE_ASSERT_CAN_THROW() /* nothing */
  17. void NVseeLibError_VCheck(HRESULT);
  18. void NVseeLibError_VThrowWin32(DWORD);
  19. void VsOriginateError(HRESULT);
  20. void FusionpOutOfMemory();
  21. #define VsVerifyThrowHr(expr, msg, hr) \
  22. do { if (!(expr)) VsOriginateError(hr); } while(0)
  23. #define VSASSERT(a,b) ASSERT_NTC(a)
  24. template <typename T> const T& NVseeLibAlgorithm_RkMaximum(const T& a, const T& b)
  25. {
  26. return (a < b) ? b : a;
  27. }
  28. class CStringW_CFixedSizeBuffer : public F::CStringBufferAccessor
  29. {
  30. typedef F::CStringBufferAccessor Base;
  31. public:
  32. CStringW_CFixedSizeBuffer(F::CUnicodeBaseStringBuffer* Buffer, SIZE_T Size)
  33. {
  34. Buffer->ThrResizeBuffer(Size + 1, /*F::*/ePreserveBufferContents);
  35. this->Attach(Buffer);
  36. }
  37. };