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__
28static const char_t __THIS_FILE__[] = __T("dcl/sql/IBModuleMain.cpp");
29#endif
30
31/*
32#ifdef _WINDOWS
33BOOL 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
54static const wchar_t* _serverTitle =
55#ifdef FIREBIRD_IBASE_H
56__T("Firebird")
57#else
58__T("InterBase")
59#endif
60;
61
63{
64// cerr << "createDatabaseObject IB\n";
65 return new IBConnection(_serverTitle);
66}
67
69{
70 return true;
71}
72
74{
75 return true;
76}
77
78extern "C"
79{
82{
83 // DCL common members
84 sizeof(SQL::DRIVER_MODULE), // structure size
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
98 _serverTitle,
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
#define __THIS_FILE__
Definition _trace.h:14
#define DCL_DSO_ENTRY_POINT
Definition Config.h:356
#define DCL_BUILD_FLAG
Definition Config.h:362
#define DCL_SQL_DRIVER_MODULE
Definition Config.h:353
wchar_t char_t
Definition Config.h:247
#define DCL_DSO_EXPORT
Definition Config.h:99
bool ModuleInitialize()
bool ModuleCleanup()
SQL::Connection * CreateConnectionInstance()
bool ModuleInitialize()
bool ModuleCleanup()
SQL::Connection * CreateConnectionInstance()
#define __T(str)
Definition Object.h:60
#define DCL_SQL_VERSION
#define __BUILD_TIMESTAMP__
#define DCL_VERSION
#define DCL_SQL_VERSION_STRING