home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / numega / sc501.exe / data1.cab / Examples / MAINERR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  3.1 KB  |  90 lines

  1. //=============================================================================
  2. //
  3. // Nu-Mega Technologies, Inc.
  4. // P.O. Box 7780
  5. // Nashua, NH 03060  USA
  6. //
  7. // (c) Copyright 1989-1996 Nu-Mega Technologies, Inc.
  8. // ALL RIGHTS RESERVED.
  9. //
  10. // The software and information contained herein are proprietary to, and
  11. // comprise valuable trade secrets of, Nu-Mega Technologies, Inc., which
  12. // intends to preserve as trade secrets such software and information.  This
  13. // software is furnished pursuant to a written license agreement and may be
  14. // used, copied, transmitted, and stored only in accordance with the terms of
  15. // such license and with the inclusion of the above copyright notice.  This
  16. // software and information or any other copies thereof may not be provided or
  17. // otherwise made available to any other person.
  18. //
  19. // Notwithstanding any other lease or license that may pertain to, or accompany
  20. // the delivery of, this computer software and information, the rights of the
  21. // Government regarding its use, reproduction and disclosure are as set forth
  22. // in Section 52.227-19 of the FARS Computer Software-Restricted Rights clause.
  23. //
  24. // Use, duplication, or disclosure by the Government is subject to restrictions
  25. // as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and
  26. // Computer Software clause at DFARS 52.227-7013.
  27. //
  28. // This computer software and information is distributed with "restricted
  29. // rights."  Use, duplication or disclosure is subject to restrictions as set
  30. // forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial Computer
  31. // Software-Restricted Rights (April 1985)."  If the Clause at 18-52.227-74
  32. // "Rights in Data General" is specified in the contract, then the "Alternate
  33. // III" clause applies.
  34. //
  35. //-----------------------------------------------------------------------------
  36. //
  37. // $Header: /BoundsChecker/Examples/BUGBNCHX/MAINERR/MAINERR.CPP 2     4/08/97 8:43a Bob $
  38. //
  39. // The main of the DLL and its exports for use by BugBench.
  40. //
  41. //-----------------------------------------------------------------------------
  42. //
  43. //
  44. //=============================================================================
  45. #include "stdafx.h"
  46. #include "bcerror.h"
  47. #ifndef BCBVER
  48. #include <crtdbg.h>
  49. #endif
  50.  
  51. #ifdef BCBVER
  52. const TCHAR g_szAppName[] = "bcberr.dll";
  53. #else
  54. const TCHAR g_szAppName[] = "mainerr.dll" ;
  55. #endif
  56.  
  57. extern "C" LPCTSTR GetAppName ( )
  58. {
  59.     return ( g_szAppName ) ;
  60. }
  61.  
  62. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  63. {
  64.     if ( DLL_PROCESS_ATTACH == dwReason )
  65.     {
  66. #ifndef BCBVER
  67.         // Turn of CRT Assertion dialog boxes.
  68.         _CrtSetReportMode ( _CRT_ASSERT , _CRTDBG_MODE_DEBUG ) ;
  69.         _CrtSetReportMode ( _CRT_ERROR , _CRTDBG_MODE_DEBUG ) ;
  70.         _CrtSetReportMode ( _CRT_WARN , _CRTDBG_MODE_DEBUG ) ;
  71. #endif
  72.     }
  73.  
  74.     return (TRUE);
  75. }
  76.  
  77.  
  78. extern "C" __declspec(dllexport)
  79. void PopulateTree ( HWND hwndTree )
  80. {
  81.     FillTree ( hwndTree ) ;
  82. }
  83.  
  84. extern "C" __declspec(dllexport)
  85. void DePopulateTree ( HWND hwndTree )
  86. {
  87.     DeleteLParam ( ) ;
  88. }
  89.  
  90.