OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
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
17
namespace
owl
{
18
19
OWL_DIAGINFO
;
20
DIAG_DECLARE_GROUP
(
OwlMain
);
21
22
}
// OWL namespace
23
24
using 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
//
30
bool
31
OWLInitUserDLL
(HINSTANCE hInstance, LPCTSTR cmdLine)
32
{
33
// If no global ::Module ptr exists yet, provide a default now
34
//
35
InitGlobalModule
(hInstance);
36
37
// Store away information about this instance
38
//
39
owl::TApplication::SetWinMainParams
(hInstance, 0,
40
cmdLine?cmdLine:
_T
(
""
), SW_SHOWNORMAL);
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
applicat.h
Definition of class TApplication.
TRACEX
#define TRACEX(group, level, message)
Definition
checks.h:263
owl::TApplication::SetWinMainParams
static void SetWinMainParams(HINSTANCE hInstance, HINSTANCE hPrevInstance, const tstring &cmdLine, int cmdShow)
Set the data members with data from WinMain.
Definition
applicat.h:694
owl::TXBase
Derived from xmsg, TXBase is the base class for ObjectWindows and ObjectComponents exception-handling...
Definition
exbase.h:41
owl::TXEndSession
TXEndSession is thrown from TWindow's handler for WM_ENDSESSION.
Definition
except.h:111
_T
#define _T(x)
Definition
cygwin.h:51
pch.h
module.h
Definition of class TModule.
OWLInitUserDLL
bool OWLInitUserDLL(HINSTANCE hInstance, LPCTSTR cmdLine)
Initialization routine that must be called from User DLL if DLL provides it's own entry point [i....
Definition
initdll.cpp:31
OwlMain
STDAPI_(owl::TDocTemplate **) GetDocTemplateHead(owl STDAPI_(owl::TModule **) GetModulePtr(owl int OwlMain(int argc, TCHAR *argv[])
Main entry point for an Owl application.
Definition
module.h:394
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::OWL_DIAGINFO
OWL_DIAGINFO
Definition
animctrl.cpp:14
owl::HandleGlobalException
int HandleGlobalException(owl::TXBase &x, LPCTSTR caption, LPCTSTR canResume=nullptr)
Definition
except.cpp:29
owl::InitGlobalModule
void InitGlobalModule(HINSTANCE hInstance)
Definition
global.cpp:36
owl::DIAG_DECLARE_GROUP
DIAG_DECLARE_GROUP(OwlThread)
defs.h
General definitions used by all ObjectWindows programs.
source
owlcore
initdll.cpp
Generated by
1.18.0