home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / beeper / prebeep.h < prev   
C/C++ Source or Header  |  1998-03-26  |  945b  |  43 lines

  1. // prebeep.h : include file for standard system include files,
  2. //      or project specific include files that are used frequently,
  3. //      but are changed infrequently
  4. //
  5. // This is a part of the Active Template Library.
  6. // Copyright (C) 1996-1998 Microsoft Corporation
  7. // All rights reserved.
  8. //
  9. // This source code is only intended as a supplement to the
  10. // Active Template Library Reference and related
  11. // electronic documentation provided with the library.
  12. // See these sources for detailed information regarding the
  13. // Active Template Library product.
  14.  
  15. #define STRICT
  16.  
  17. #include <atlbase.h>
  18.  
  19. #ifdef _WINDLL
  20.  
  21. typedef CComModule CMyModule;
  22.  
  23. #else
  24.  
  25. class CMyModule : public CComModule
  26. {
  27. public:
  28.     LONG Unlock()
  29.     {
  30.         LONG l = CComModule::Unlock();
  31.         if (l == 0)
  32.             PostThreadMessage(dwThreadID, WM_QUIT, 0, 0);
  33.         return l;
  34.     }
  35.     DWORD dwThreadID;
  36. };
  37.  
  38. #endif
  39.  
  40. extern CMyModule _Module;
  41.  
  42. #include <atlcom.h>
  43.