OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
_
b
c
d
h
i
j
m
o
p
r
s
t
u
y
Enumerations
a
o
s
t
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
c
d
e
i
l
p
r
s
t
v
Enumerations
c
h
p
q
s
t
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
d
g
i
o
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
_
c
d
g
i
m
o
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
libmain.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 implementation of DLlEntryPoint()/LibMain() for user DLLs
7
//----------------------------------------------------------------------------
8
#include <
owl/pch.h
>
9
#include <
owl/applicat.h
>
10
11
#if defined(__BORLANDC__)
12
# pragma option -w-ccc
// Disable "Condition is always true/false"
13
#endif
14
15
namespace
owl
{
16
17
OWL_DIAGINFO
;
18
DIAG_DECLARE_GROUP
(
OwlMain
);
19
20
}
// OWL namespace
21
22
using namespace
owl
;
23
24
// MSC code in module.cpp
25
#if !defined(_BUILDOWLDLL) && !defined(_OWLDLL)
26
#if defined(BI_COMP_BORLANDC)
27
// NOTE: We use priority 31 to come just before/after ctr/dtr of global
28
// objects (which are assigned a priorority of 32)
29
//
30
long
TlsAddRefs
();
31
long
TlsRelease
();
32
33
static
void
__initOWL
()
34
{
35
TlsAddRefs
();
36
}
37
#pragma startup __initOWL 31
38
39
//
40
static
void
__termOWL
()
41
{
42
TlsRelease
();
43
}
44
#pragma exit __termOWL 31
45
#endif
// BI_COMP_BORLANDC
46
#endif
// if !_BUILDOWLDLL
47
48
#if defined(BI_COMP_MSC)
49
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
reason
,
LPVOID
)
50
#else
51
int
WINAPI
DllEntryPoint
(
HINSTANCE
hInstance
,
uint32
reason
,
LPVOID
)
52
#endif
53
{
54
TRACEX
(
OwlMain
, 0,
"DllEntryPoint("
<<
hInstance
<<
", "
<<
reason
<<
", "
<<
55
") called"
);
56
57
switch
(
reason
) {
58
case
DLL_PROCESS_ATTACH
:
59
60
// If you provide your own version of DLL EntryPoint, make sure
61
// you call OwlInitUserDLL to allow OWL to initialize '::Module'
62
//
63
return
OWLInitUserDLL
(
hInstance
,
_T
(
""
)) ? 1 : 0;
64
}
65
return
1;
66
}
51
int
WINAPI
DllEntryPoint
(
HINSTANCE
hInstance
,
uint32
reason
,
LPVOID
) {
…
}
67
applicat.h
Definition of class TApplication.
DIAG_DECLARE_GROUP
#define DIAG_DECLARE_GROUP(group)
Definition
checks.h:404
TRACEX
#define TRACEX(group, level, message)
Definition
checks.h:263
VarType
Definition
safearray.h:14
_T
#define _T(x)
Definition
cygwin.h:51
pch.h
DllEntryPoint
int WINAPI DllEntryPoint(HINSTANCE hInstance, uint32 reason, LPVOID)
Definition
libmain.cpp:51
TlsAddRefs
long TlsAddRefs()
Definition
thread.cpp:761
TlsRelease
long TlsRelease()
Definition
thread.cpp:766
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 in OwlMain)(int argc, TCHAR *argv[])
Main entry point for an Owl application.
Definition
module.h:391
owl
Object Windows Library (OWLNext Core)
Definition
animctrl.h:22
owl::uint32
unsigned long uint32
Definition
number.h:34
owl::OWL_DIAGINFO
OWL_DIAGINFO
Definition
animctrl.cpp:14
source
owlcore
libmain.cpp
Generated by
1.10.0