home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / owlsrc.pak / GLOBAL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-24  |  1.2 KB  |  42 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1991, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Global data required for every module using OWL
  6. //----------------------------------------------------------------------------
  7. #include <owl/owlpch.h>
  8. #include <owl/applicat.h>
  9.  
  10. class _OWLCLASS TDocTemplate;
  11.  
  12. //
  13. // Global module pointer representing this executable instance
  14. // provides the default instance for resources contructed within this module
  15. //
  16. TModule* Module = 0;  // must be set to a TApplication* or a TModule*
  17.  
  18. //
  19. // Document templates contructed before doc manager get linked in here
  20. //
  21. TDocTemplate* DocTemplateStaticHead = 0;  // initialize to no templates
  22.  
  23. //
  24. // Exported access to global variables for DLLs that use OWL
  25. //
  26. #if defined(BI_APP_DLL)
  27. extern "C" {
  28.  
  29. TDocTemplate** PASCAL __export GetDocTemplateHead(int version)
  30. {
  31.   return (version&0xFFF0) == (OWLVersion&0xFFF0) ? &DocTemplateStaticHead : 0;
  32. }
  33.  
  34. TModule** PASCAL __export GetModulePtr(int version)
  35. {
  36.   return (version&0xFFF0) == (OWLVersion&0xFFF0) ? &Module : 0;
  37. }
  38.  
  39. }
  40.  
  41. #endif
  42.