DCL
3.7.4
Loading...
Searching...
No Matches
IBModuleMain.cpp
Go to the documentation of this file.
1
#include <
dcl/Config.h
>
2
3
#include <ibase.h>
4
5
#ifdef _MSC_VER
6
#ifdef _WIN64
7
#ifdef FIREBIRD_IBASE_H
8
#pragma comment(lib, "fbclient_ms.lib")
9
#else
10
#pragma comment(lib, "ibclient64_ms.lib")
11
#endif
12
#else
13
#pragma comment(lib, "gds32_ms.lib")
14
#endif
15
#endif
16
17
#include <
dcl/Object.h
>
18
#if __DCL_HAVE_ALLOC_DEBUG
19
#undef __DCL_ALLOC_LEVEL
20
#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
21
#endif
22
23
#include <
dcl/SQLCore.h
>
24
#include "
IBConnection.h
"
25
26
#if __DCL_HAVE_THIS_FILE__
27
#undef __THIS_FILE__
28
static
const
char_t
__THIS_FILE__
[] =
__T
(
"dcl/sql/IBModuleMain.cpp"
);
29
#endif
30
31
/*
32
#ifdef _WINDOWS
33
BOOL APIENTRY DllMain( HANDLE hModule,
34
DWORD ul_reason_for_call,
35
LPVOID lpReserved
36
)
37
{
38
switch (ul_reason_for_call) {
39
case DLL_PROCESS_ATTACH:
40
case DLL_PROCESS_DETACH:
41
return TRUE;
42
case DLL_THREAD_ATTACH:
43
case DLL_THREAD_DETACH:
44
break;
45
}
46
return FALSE;
47
}
48
49
#endif
50
*/
51
52
__DCL_BEGIN_NAMESPACE
53
54
static
const
wchar_t
* _serverTitle =
55
#ifdef FIREBIRD_IBASE_H
56
__T
(
"Firebird"
)
57
#else
58
__T
(
"InterBase"
)
59
#endif
60
;
61
62
SQL::Connection
*
CreateConnectionInstance
()
63
{
64
// cerr << "createDatabaseObject IB\n";
65
return
new
IBConnection
(_serverTitle);
66
}
67
68
bool
ModuleInitialize
()
69
{
70
return
true
;
71
}
72
73
bool
ModuleCleanup
()
74
{
75
return
true
;
76
}
77
78
extern
"C"
79
{
80
DCL_DSO_EXPORT
81
SQL::DRIVER_MODULE
DCL_DSO_ENTRY_POINT
=
82
{
83
// DCL common members
84
sizeof
(
SQL::DRIVER_MODULE
),
// structure size
85
DCL_VERSION
,
86
__T
(
__BUILD_TIMESTAMP__
),
87
DCL_BUILD_FLAG
,
88
DCL_SQL_DRIVER_MODULE
,
// module type
89
#ifdef FIREBIRD_IBASE_H
90
__T
(
"DCL SQL Adapter for Firebird"
)
91
#else
92
__T
(
"DCL SQL Adapter for InterBase 2010 (XE) V10"
)
93
#endif
94
,
95
96
// private members
97
DCL_SQL_VERSION
,
98
_serverTitle,
99
__T
(
DCL_SQL_VERSION_STRING
),
100
ModuleInitialize
,
101
ModuleCleanup
,
102
CreateConnectionInstance
103
};
104
105
}
106
107
__DCL_END_NAMESPACE
108
109
#ifdef __WINNT_NEW_DELETE_OVERRIDE
110
#undef new
111
__WINNT_NEW_DELETE_OVERRIDE
112
#endif
__THIS_FILE__
#define __THIS_FILE__
Definition
_trace.h:14
Config.h
DCL_DSO_ENTRY_POINT
#define DCL_DSO_ENTRY_POINT
Definition
Config.h:356
DCL_BUILD_FLAG
#define DCL_BUILD_FLAG
Definition
Config.h:362
DCL_SQL_DRIVER_MODULE
#define DCL_SQL_DRIVER_MODULE
Definition
Config.h:353
char_t
wchar_t char_t
Definition
Config.h:247
DCL_DSO_EXPORT
#define DCL_DSO_EXPORT
Definition
Config.h:99
IBConnection.h
ModuleInitialize
bool ModuleInitialize()
Definition
IBModuleMain.cpp:68
ModuleCleanup
bool ModuleCleanup()
Definition
IBModuleMain.cpp:73
CreateConnectionInstance
SQL::Connection * CreateConnectionInstance()
Definition
IBModuleMain.cpp:62
ModuleInitialize
bool ModuleInitialize()
Definition
IFXModuleMain.cpp:99
ModuleCleanup
bool ModuleCleanup()
Definition
IFXModuleMain.cpp:137
CreateConnectionInstance
SQL::Connection * CreateConnectionInstance()
Definition
IFXModuleMain.cpp:94
Object.h
__T
#define __T(str)
Definition
Object.h:60
SQLCore.h
IBConnection
Definition
IBConnection.h:17
SQL::Connection
Definition
SQLCore.h:327
DCL_SQL_VERSION
#define DCL_SQL_VERSION
Definition
include/dcl/Version.h:26
__BUILD_TIMESTAMP__
#define __BUILD_TIMESTAMP__
Definition
include/dcl/Version.h:5
DCL_VERSION
#define DCL_VERSION
Definition
include/dcl/Version.h:14
DCL_SQL_VERSION_STRING
#define DCL_SQL_VERSION_STRING
Definition
include/dcl/Version.h:27
SQL::DRIVER_MODULE
Definition
SQLCore.h:460
src
SQLInterBase
IBModuleMain.cpp
Generated by
1.14.0