OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
initdll.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1991, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Default OwlMain to satisfy LibMain in DLLs that aren't components
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9#include <owl/defs.h>
10#include <owl/module.h>
11#include <owl/applicat.h>
12
13#if defined(__BORLANDC__)
14# pragma option -w-ccc // Disable "Condition is always true/false"
15#endif
16
17namespace owl {
18
21
22} // OWL namespace
23
24using namespace owl;
25
26/// Routine which initializes an OWL User DLL..
27/// \note Must be explicitly invoked if your DLL provides it's own
28/// LibMain, DllEntryPoint (or DllMain).
29//
30bool
32{
33 // If no global ::Module ptr exists yet, provide a default now
34 //
36
37 // Store away information about this instance
38 //
41
42 try {
43 int retVal = OwlMain(0, 0);
44 TRACEX(OwlMain, 0, _T("DllEntryPoint() returns ") << retVal);
45 return retVal == 0;
46 }
47 catch (TXEndSession&) {return true;}
48 catch (TXBase& x) {return owl::HandleGlobalException(x, 0) == 0;}
49}
50
51/* ========================================================================== */
52
Definition of class TApplication.
#define DIAG_DECLARE_GROUP(group)
Definition checks.h:404
#define TRACEX(group, level, message)
Definition checks.h:263
static void SetWinMainParams(HINSTANCE hInstance, HINSTANCE hPrevInstance, const tstring &cmdLine, int cmdShow)
Set the data members with data from WinMain.
Definition applicat.h:694
Derived from xmsg, TXBase is the base class for ObjectWindows and ObjectComponents exception-handling...
Definition exbase.h:41
TXEndSession is thrown from TWindow's handler for WM_ENDSESSION.
Definition except.h:111
#define _T(x)
Definition cygwin.h:51
bool OWLInitUserDLL(HINSTANCE hInstance, LPCTSTR cmdLine)
Routine which initializes an OWL User DLL.
Definition initdll.cpp:31
Definition of class TModule.
STDAPI_(owl::TDocTemplate **) GetDocTemplateHead(owl STDAPI_(owl::TModule **) GetModulePtr(owl in OwlMain)(int argc, TCHAR *argv[])
Main entry point for an Owl application.
Definition module.h:391
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
OWL_DIAGINFO
Definition animctrl.cpp:14
int HandleGlobalException(owl::TXBase &x, LPCTSTR caption, LPCTSTR canResume=nullptr)
Definition except.cpp:29
void InitGlobalModule(HINSTANCE hInstance)
Definition global.cpp:36
General definitions used by all ObjectWindows programs.