home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / OWLSRC.PAK / GLOBAL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.4 KB  |  59 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.8  $
  6. //
  7. // Global data required for every module using OWL
  8. //----------------------------------------------------------------------------
  9. #include <owl/pch.h>
  10. #if !defined(OWL_APPLICAT_H)
  11. # include <owl/applicat.h>
  12. #endif
  13.  
  14. // Diagnostic group shared by LibMain/OwlMain modules
  15. //
  16. OWL_DIAGINFO;
  17. DIAG_DEFINE_GROUP_INIT(OWL_INI, OwlMain, true, 0);
  18.  
  19. class _OWLCLASS TDocTemplate;
  20.  
  21. #if defined(BI_NAMESPACE)
  22. namespace OWL {
  23. #endif
  24.  
  25. //
  26. // Global module pointer representing this executable instance
  27. // provides the default instance for resources contructed within this module
  28. //
  29. TModule* Module = 0;  // must be set to a TApplication* or a TModule*
  30.  
  31. //
  32. // Document templates contructed before doc manager get linked in here
  33. //
  34. TDocTemplate* DocTemplateStaticHead = 0;  // initialize to no templates
  35.  
  36. //
  37. // Exported access to global variables for DLLs that use OWL
  38. //
  39. #if defined(BI_APP_DLL)
  40. extern "C" {
  41.  
  42. TDocTemplate** PASCAL __export GetDocTemplateHead(int version)
  43. {
  44.   return (version&0xFFF0) == (OWLVersion&0xFFF0) ? &DocTemplateStaticHead : 0;
  45. }
  46.  
  47. TModule** PASCAL __export GetModulePtr(int version)
  48. {
  49.   return (version&0xFFF0) == (OWLVersion&0xFFF0) ? &Module : 0;
  50. }
  51.  
  52. }
  53. #endif
  54.  
  55. #if defined(BI_NAMESPACE)
  56. } // namespace OWL
  57. #endif
  58.  
  59.