DCL 3.7.4
Loading...
Searching...
No Matches
MyModuleMain.cpp
Go to the documentation of this file.
1#include <dcl/Config.h>
2
3#ifdef _MSC_VER
4 #if 1
5 #pragma comment(lib, "libmariadb.lib")
6 #else
7 #pragma comment(lib, "mariadbclient.lib")
8 #pragma comment(lib, "ws2_32.lib")
9 #pragma comment(lib, "secur32.lib")
10 #pragma comment(lib, "crypt32.lib")
11 #pragma comment(lib, "bcrypt.lib")
12 #pragma comment(lib, "shlwapi.lib")
13 #endif
14#endif
15
16#include <mysql.h>
17
18#if MYSQL_VERSION_ID < 32224
19#error "invalid mysql version"
20#endif
21
22#include <dcl/Object.h>
23#if __DCL_HAVE_ALLOC_DEBUG
24#undef __DCL_ALLOC_LEVEL
25#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
26#endif
27
28#include <dcl/SQLCore.h>
29#include "MyConnection.h"
30
31#if __DCL_HAVE_THIS_FILE__
32#undef __THIS_FILE__
33static const char_t __THIS_FILE__[] = __T("dcl/sql/MyModuleMain.cpp");
34#endif
35
36/*
37#ifdef _WINDOWS
38BOOL APIENTRY DllMain( HANDLE hModule,
39 DWORD ul_reason_for_call,
40 LPVOID lpReserved
41)
42{
43 switch (ul_reason_for_call) {
44 case DLL_PROCESS_ATTACH:
45 case DLL_PROCESS_DETACH:
46 return TRUE;
47 case DLL_THREAD_ATTACH:
48 case DLL_THREAD_DETACH:
49 break;
50 }
51 return FALSE;
52}
53#endif
54*/
55
56__DCL_BEGIN_NAMESPACE
57
58static const wchar_t* _serverTitle = __T("MariaDB");
59
61{
62 return new MyConnection(_serverTitle);
63}
64
66{
67 return true;
68}
69
71{
72 return true;
73}
74
75extern "C"
76{
79{
80 // DCL common members
81 sizeof(SQL::DRIVER_MODULE), // structure size
85 DCL_SQL_DRIVER_MODULE, // module type
86 __T("DCL SQL Adapter for MariaDB, MySQL Database Server"),
87
88 // private members
90 _serverTitle,
95};
96
97}
98
99__DCL_END_NAMESPACE
100
101#ifdef __WINNT_NEW_DELETE_OVERRIDE
102#undef new
103__WINNT_NEW_DELETE_OVERRIDE
104#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