home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / src / dblong.cpp < prev    next >
C/C++ Source or Header  |  1998-06-16  |  2KB  |  70 lines

  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.  
  11. #include "stdafx.h"
  12.  
  13. #ifdef AFX_DB_SEG
  14. #pragma code_seg(AFX_DB_SEG)
  15. #endif
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. #define new DEBUG_NEW
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CLongBinary class for holding LONG VARBINARY data
  26.  
  27. CLongBinary::CLongBinary()
  28. {
  29.     m_hData = NULL;
  30. }
  31.  
  32. CLongBinary::~CLongBinary()
  33. {
  34.     if (m_hData != NULL)
  35.     {
  36.         ::GlobalFree(m_hData);
  37.         m_hData = NULL;
  38.     }
  39. }
  40.  
  41. //////////////////////////////////////////////////////////////////////////////
  42. // CLongBinary diagnostics
  43.  
  44. #ifdef _DEBUG
  45. void CLongBinary::AssertValid() const
  46. {
  47.     CObject::AssertValid();
  48. }
  49.  
  50. void CLongBinary::Dump(CDumpContext& dc) const
  51. {
  52.     CObject::Dump(dc);
  53.  
  54.     dc << "m_hData = " << m_hData;
  55.     dc << "\nm_dwDataLength = " << m_dwDataLength;
  56.     dc << "\n";
  57. }
  58. #endif //_DEBUG
  59.  
  60. //////////////////////////////////////////////////////////////////////////////
  61.  
  62.  
  63. #ifdef AFX_INIT_SEG
  64. #pragma code_seg(AFX_INIT_SEG)
  65. #endif
  66.  
  67. IMPLEMENT_DYNAMIC(CLongBinary, CObject)
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70.