dblong.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. #include "stdafx.h"
  11. #ifdef AFX_DB_SEG
  12. #pragma code_seg(AFX_DB_SEG)
  13. #endif
  14. #ifdef _DEBUG
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. #define new DEBUG_NEW
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CLongBinary class for holding LONG VARBINARY data
  21. CLongBinary::CLongBinary()
  22. {
  23. m_hData = NULL;
  24. }
  25. CLongBinary::~CLongBinary()
  26. {
  27. if (m_hData != NULL)
  28. {
  29. ::GlobalFree(m_hData);
  30. m_hData = NULL;
  31. }
  32. }
  33. //////////////////////////////////////////////////////////////////////////////
  34. // CLongBinary diagnostics
  35. #ifdef _DEBUG
  36. void CLongBinary::AssertValid() const
  37. {
  38. CObject::AssertValid();
  39. }
  40. void CLongBinary::Dump(CDumpContext& dc) const
  41. {
  42. CObject::Dump(dc);
  43. dc << "m_hData = " << m_hData;
  44. dc << "\nm_dwDataLength = " << m_dwDataLength;
  45. dc << "\n";
  46. }
  47. #endif //_DEBUG
  48. //////////////////////////////////////////////////////////////////////////////
  49. #ifdef AFX_INIT_SEG
  50. #pragma code_seg(AFX_INIT_SEG)
  51. #endif
  52. IMPLEMENT_DYNAMIC(CLongBinary, CObject)
  53. /////////////////////////////////////////////////////////////////////////////