DCL 4.0
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#include <dcl/Object.h>
6#if __DCL_HAVE_ALLOC_DEBUG
7#undef __DCL_ALLOC_LEVEL
8#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
9#endif
10
11#include <dcl/SQLCore.h>
12#include "IBConnection.h"
13
14#ifdef _MSC_VER
15#ifdef _WIN64
16 #ifdef FIREBIRD_IBASE_H
17 #pragma comment(lib, "fbclient_ms.lib")
18 #else
19 #pragma comment(lib, "ibclient64_ms.lib")
20 #endif
21#else
22#pragma comment(lib, "gds32_ms.lib")
23#endif
24#endif
25
26#if __DCL_HAVE_THIS_FILE__
27#undef __THIS_FILE__
28static const wchar_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 {
40 case DLL_PROCESS_ATTACH:
41 case DLL_PROCESS_DETACH:
42 return TRUE;
43 case DLL_THREAD_ATTACH:
44 case DLL_THREAD_DETACH:
45 break;
46 }
47 return FALSE;
48}
49
50#endif
51*/
52
53__DCL_BEGIN_NAMESPACE
54
55static const wchar_t* _serverTitle =
56#ifdef FIREBIRD_IBASE_H
57__T("Firebird")
58#else
59__T("InterBase")
60#endif
61;
62
64{
65// cerr << "createDatabaseObject IB\n";
66 return new IBConnection(_serverTitle);
67}
68
70{
71 return true;
72}
73
75{
76 return true;
77}
78
79extern "C"
80{
83{
84 // DCL common members
85 sizeof(SQL::DRIVER_MODULE), // structure size
89 DCL_SQL_DRIVER_MODULE, // module type
90#ifdef FIREBIRD_IBASE_H
91 __T("DCL SQL Driver for Firebird")
92#else
93 __T("DCL SQL Driver for InterBase 2010 (XE) V10")
94#endif
95 ,
96
97 // private members
99 _serverTitle,
100 __T("4.0.0.0"),
104};
105
106}
107
108__DCL_END_NAMESPACE
#define __THIS_FILE__
Definition _trace.h:14
#define __TIMESTAMP__
Definition Config.h:215
#define DCL_DSO_ENTRY_POINT
Definition Config.h:393
#define DCL_BUILD_FLAG
Definition Config.h:399
#define DCL_SQL_DRIVER_MODULE
Definition Config.h:390
#define DCL_SQL_VERSION
Definition Config.h:381
#define DCL_VERSION
Definition Config.h:376
#define DCL_DSO_EXPORT
Definition Config.h:111
bool ModuleInitialize()
bool ModuleCleanup()
SQL::Connection * CreateConnectionInstance()
bool ModuleInitialize()
bool ModuleCleanup()
SQL::Connection * CreateConnectionInstance()
#define __T(str)
Definition Object.h:44