transactd 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/BUILD_UNIX-JA +174 -0
- data/BUILD_WIN-JA +256 -0
- data/CMakeLists.txt +96 -0
- data/COPYING +339 -0
- data/README +406 -0
- data/README-JA +424 -0
- data/bin/common/tdclc_32_1_0.dll +0 -0
- data/bin/common/tdclc_64_1_0.dll +0 -0
- data/build/common/check_for_link_iconv.cmake +73 -0
- data/build/common/copyifgreater.cmd +30 -0
- data/build/common/copyifgreater.js +290 -0
- data/build/common/get_boost_libs.cmake +106 -0
- data/build/common/get_ruby_path.cmake +115 -0
- data/build/common/options.cmake +127 -0
- data/build/common/smart_install.cmake +263 -0
- data/build/common/system.cmake +122 -0
- data/build/common/transactd.rc.in +52 -0
- data/build/common/transactd_cl_common.cmake +101 -0
- data/build/common/transactd_cl_output.cmake +93 -0
- data/build/common/transactd_common.cmake +237 -0
- data/build/common/transactd_required.cmake +28 -0
- data/build/swig/ruby/generate.cmake.in +35 -0
- data/build/swig/ruby/generate.cmd.in +19 -0
- data/build/swig/ruby/ruby.swg +101 -0
- data/build/swig/tdcl.i +188 -0
- data/build/tdclc/BUILDNUMBER.txt +1 -0
- data/build/tdclc/CMakeLists.txt +170 -0
- data/build/tdclc/tdclc_32.cbproj +181 -0
- data/build/tdclc/tdclc_64.cbproj +205 -0
- data/build/tdclcpp/BUILDNUMBER.txt +1 -0
- data/build/tdclcpp/CMakeLists.txt +142 -0
- data/build/tdclcpp/tdclcpp_bcb_32.cbproj +239 -0
- data/build/tdclcpp/tdclcpp_bcb_64.cbproj +304 -0
- data/build/tdclrb/BUILDNUMBER.txt +1 -0
- data/build/tdclrb/CMakeLists.txt +258 -0
- data/build/tdclrb/GEM_VERSION +3 -0
- data/build/tdclrb/bldgem/extconf.rb +123 -0
- data/build/tdclrb/gem/INSTALLLOG.win32 +9 -0
- data/build/tdclrb/gem/Makefile.win32-VS +65 -0
- data/build/tdclrb/gem/Makefile.win32-prebuilt +48 -0
- data/build/tdclrb/gem/detect.rb +31 -0
- data/build/tdclrb/gem/helper.rb +113 -0
- data/build/tdclrb/gem/transactd.rb +22 -0
- data/build/tdclrb/gem_output.cmake +44 -0
- data/source/bzs/db/IBlobBuffer.h +51 -0
- data/source/bzs/db/blobBuffer.h +177 -0
- data/source/bzs/db/blobStructs.h +85 -0
- data/source/bzs/db/engine/mysql/IReadRecords.h +52 -0
- data/source/bzs/db/engine/mysql/bookmark.h +195 -0
- data/source/bzs/db/engine/mysql/database.cpp +1882 -0
- data/source/bzs/db/engine/mysql/database.h +465 -0
- data/source/bzs/db/engine/mysql/dbManager.cpp +303 -0
- data/source/bzs/db/engine/mysql/dbManager.h +143 -0
- data/source/bzs/db/engine/mysql/errorMessage.cpp +75 -0
- data/source/bzs/db/engine/mysql/errorMessage.h +43 -0
- data/source/bzs/db/engine/mysql/fieldAccess.h +158 -0
- data/source/bzs/db/engine/mysql/mydebuglog.cpp +349 -0
- data/source/bzs/db/engine/mysql/mydebuglog.h +89 -0
- data/source/bzs/db/engine/mysql/mysqlInternal.h +171 -0
- data/source/bzs/db/engine/mysql/mysqlThd.cpp +169 -0
- data/source/bzs/db/engine/mysql/mysqlThd.h +35 -0
- data/source/bzs/db/engine/mysql/percentageKey.h +260 -0
- data/source/bzs/db/protocol/ICommandExecuter.h +49 -0
- data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +689 -0
- data/source/bzs/db/protocol/hs/hsCommandExecuter.h +228 -0
- data/source/bzs/db/protocol/tdap/btrDate.cpp +437 -0
- data/source/bzs/db/protocol/tdap/btrDate.h +227 -0
- data/source/bzs/db/protocol/tdap/client/bulkInsert.h +127 -0
- data/source/bzs/db/protocol/tdap/client/client.cpp +106 -0
- data/source/bzs/db/protocol/tdap/client/client.h +292 -0
- data/source/bzs/db/protocol/tdap/client/connMgr.cpp +144 -0
- data/source/bzs/db/protocol/tdap/client/connMgr.h +82 -0
- data/source/bzs/db/protocol/tdap/client/database.cpp +863 -0
- data/source/bzs/db/protocol/tdap/client/database.h +118 -0
- data/source/bzs/db/protocol/tdap/client/databaseFactory.cpp +100 -0
- data/source/bzs/db/protocol/tdap/client/dbDef.cpp +1640 -0
- data/source/bzs/db/protocol/tdap/client/dbDef.h +135 -0
- data/source/bzs/db/protocol/tdap/client/dllmain.cpp +434 -0
- data/source/bzs/db/protocol/tdap/client/errorMessage.cpp +92 -0
- data/source/bzs/db/protocol/tdap/client/errorMessage_ja.cpp +98 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +174 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.h +91 -0
- data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +140 -0
- data/source/bzs/db/protocol/tdap/client/fileDDF.h +86 -0
- data/source/bzs/db/protocol/tdap/client/filter.cpp +527 -0
- data/source/bzs/db/protocol/tdap/client/filter.h +154 -0
- data/source/bzs/db/protocol/tdap/client/indexDDF.cpp +137 -0
- data/source/bzs/db/protocol/tdap/client/indexDDF.h +84 -0
- data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +724 -0
- data/source/bzs/db/protocol/tdap/client/nsDatabase.h +123 -0
- data/source/bzs/db/protocol/tdap/client/nsTable.cpp +899 -0
- data/source/bzs/db/protocol/tdap/client/nsTable.h +199 -0
- data/source/bzs/db/protocol/tdap/client/request.h +198 -0
- data/source/bzs/db/protocol/tdap/client/sharedData.cpp +58 -0
- data/source/bzs/db/protocol/tdap/client/sharedData.h +56 -0
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +574 -0
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.h +53 -0
- data/source/bzs/db/protocol/tdap/client/stringConverter.h +627 -0
- data/source/bzs/db/protocol/tdap/client/table.cpp +2613 -0
- data/source/bzs/db/protocol/tdap/client/table.h +221 -0
- data/source/bzs/db/protocol/tdap/client/trdboostapi.h +1096 -0
- data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +179 -0
- data/source/bzs/db/protocol/tdap/client/trdclcppautolink.h +40 -0
- data/source/bzs/db/protocol/tdap/client/trnsctcl.def +11 -0
- data/source/bzs/db/protocol/tdap/myDateTime.cpp +500 -0
- data/source/bzs/db/protocol/tdap/mysql/characterset.cpp +184 -0
- data/source/bzs/db/protocol/tdap/mysql/characterset.h +60 -0
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +284 -0
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.h +53 -0
- data/source/bzs/db/protocol/tdap/mysql/debuglog.cpp +383 -0
- data/source/bzs/db/protocol/tdap/mysql/debuglog.h +106 -0
- data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +680 -0
- data/source/bzs/db/protocol/tdap/mysql/request.h +202 -0
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +1020 -0
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +141 -0
- data/source/bzs/db/protocol/tdap/tdapRequest.h +190 -0
- data/source/bzs/db/protocol/tdap/tdapSchema.cpp +295 -0
- data/source/bzs/db/protocol/tdap/tdapSchema.h +558 -0
- data/source/bzs/db/protocol/tdap/tdapcapi.h +423 -0
- data/source/bzs/db/transactd/appBuilderImple.h +55 -0
- data/source/bzs/db/transactd/appModule.cpp +183 -0
- data/source/bzs/db/transactd/appModule.h +80 -0
- data/source/bzs/db/transactd/connManager.cpp +201 -0
- data/source/bzs/db/transactd/connManager.h +60 -0
- data/source/bzs/db/transactd/connectionRecord.h +69 -0
- data/source/bzs/db/transactd/transactd.cpp +325 -0
- data/source/bzs/env/compiler.h +135 -0
- data/source/bzs/env/crosscompile.cpp +130 -0
- data/source/bzs/env/crosscompile.h +150 -0
- data/source/bzs/env/fileopen.h +36 -0
- data/source/bzs/env/mbcswchrLinux.cpp +40 -0
- data/source/bzs/env/mbcswchrLinux.h +88 -0
- data/source/bzs/env/tstring.h +183 -0
- data/source/bzs/example/changeSchema.cpp +117 -0
- data/source/bzs/example/changeSchema_c.cpp +78 -0
- data/source/bzs/example/connection_pool_c.cpp +171 -0
- data/source/bzs/example/createDatabase.cpp +305 -0
- data/source/bzs/example/createDatabase_c.cpp +202 -0
- data/source/bzs/example/deleteRecords.cpp +87 -0
- data/source/bzs/example/deleteRecords_c.cpp +57 -0
- data/source/bzs/example/dropDatabase.cpp +59 -0
- data/source/bzs/example/dropDatabase_c.cpp +34 -0
- data/source/bzs/example/insertRecords.cpp +212 -0
- data/source/bzs/example/insertRecords_c.cpp +153 -0
- data/source/bzs/example/readRecords.cpp +141 -0
- data/source/bzs/example/readRecords_c.cpp +107 -0
- data/source/bzs/example/updateRecords.cpp +99 -0
- data/source/bzs/example/updateRecords_c.cpp +71 -0
- data/source/bzs/example/update_with_transaction.cpp +104 -0
- data/source/bzs/example/update_with_transaction_c.cpp +80 -0
- data/source/bzs/netsvc/client/tcpClient.cpp +226 -0
- data/source/bzs/netsvc/client/tcpClient.h +489 -0
- data/source/bzs/netsvc/server/IAppModule.h +94 -0
- data/source/bzs/netsvc/server/iserver.h +65 -0
- data/source/bzs/netsvc/server/serverCpt.cpp +522 -0
- data/source/bzs/netsvc/server/serverCpt.h +88 -0
- data/source/bzs/netsvc/server/serverPipe.cpp +705 -0
- data/source/bzs/netsvc/server/serverPipe.h +96 -0
- data/source/bzs/netsvc/server/serverTpool.cpp +416 -0
- data/source/bzs/netsvc/server/serverTpool.h +84 -0
- data/source/bzs/rtl/benchmark.cpp +96 -0
- data/source/bzs/rtl/benchmark.h +65 -0
- data/source/bzs/rtl/datetime.cpp +375 -0
- data/source/bzs/rtl/datetime.h +53 -0
- data/source/bzs/rtl/debuglog.cpp +106 -0
- data/source/bzs/rtl/debuglog.h +97 -0
- data/source/bzs/rtl/exception.h +116 -0
- data/source/bzs/rtl/stl_uty.cpp +35 -0
- data/source/bzs/rtl/stl_uty.h +29 -0
- data/source/bzs/rtl/stringBuffers.cpp +101 -0
- data/source/bzs/rtl/stringBuffers.h +58 -0
- data/source/bzs/rtl/strtrim.cpp +135 -0
- data/source/bzs/rtl/strtrim.h +46 -0
- data/source/bzs/test/tdclatl/bench_tdclatl.js +445 -0
- data/source/bzs/test/tdclrb/bench_tdclcpp.rb +375 -0
- data/source/bzs/test/tdclrb/prepare.rb +226 -0
- data/source/bzs/test/tdclrb/transactd_datetime_spec.rb +172 -0
- data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +208 -0
- data/source/bzs/test/tdclrb/transactd_spec.rb +1536 -0
- data/source/bzs/test/transactdBench/transactdBench.cpp +430 -0
- data/source/bzs/test/transactdBench/transactdBench2.cpp +342 -0
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +2030 -0
- data/source/global/tdclatl/Database.cpp +503 -0
- data/source/global/tdclatl/Database.h +139 -0
- data/source/global/tdclatl/DbDef.cpp +242 -0
- data/source/global/tdclatl/DbDef.h +79 -0
- data/source/global/tdclatl/Field.cpp +92 -0
- data/source/global/tdclatl/Field.h +59 -0
- data/source/global/tdclatl/FieldDef.cpp +238 -0
- data/source/global/tdclatl/FieldDef.h +87 -0
- data/source/global/tdclatl/Flags.cpp +111 -0
- data/source/global/tdclatl/Flags.h +55 -0
- data/source/global/tdclatl/KeyDef.cpp +51 -0
- data/source/global/tdclatl/KeyDef.h +55 -0
- data/source/global/tdclatl/KeySegment.cpp +55 -0
- data/source/global/tdclatl/Table.cpp +600 -0
- data/source/global/tdclatl/Table.h +144 -0
- data/source/global/tdclatl/TableDef.cpp +291 -0
- data/source/global/tdclatl/TableDef.h +86 -0
- data/source/global/tdclatl/TdVersion.cpp +74 -0
- data/source/global/tdclatl/TdVersion.h +54 -0
- data/source/global/tdclatl/_IDatabaseEvents_CP.h +113 -0
- data/source/global/tdclatl/dllmain.cpp +30 -0
- data/source/global/tdclatl/dllmain.h +27 -0
- data/source/global/tdclatl/keySegment.h +57 -0
- data/source/global/tdclatl/resource.h +0 -0
- data/source/global/tdclatl/stdafx.cpp +2 -0
- data/source/global/tdclatl/stdafx.h +25 -0
- data/source/global/tdclatl/targetver.h +4 -0
- data/source/global/tdclatl/tdclatl.cpp +68 -0
- data/source/global/tdclatl/tdclatl.def +10 -0
- data/source/global/tdclatl/tdclatl.idl +1035 -0
- data/source/linux/charsetConvert.h +112 -0
- data/source/linux/linuxTypes.h +33 -0
- data/source/linux/tchar.h +428 -0
- data/transactd.gemspec +97 -0
- metadata +267 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
/*=================================================================
|
|
3
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
4
|
+
|
|
5
|
+
This program is free software; you can redistribute it and/or
|
|
6
|
+
modify it under the terms of the GNU General Public License
|
|
7
|
+
as published by the Free Software Foundation; either version 2
|
|
8
|
+
of the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU General Public License
|
|
16
|
+
along with this program; if not, write to the Free Software
|
|
17
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
18
|
+
02111-1307, USA.
|
|
19
|
+
=================================================================*/
|
|
20
|
+
|
|
21
|
+
template<class T>
|
|
22
|
+
class CProxy_IDatabaseEvents :
|
|
23
|
+
public ATL::IConnectionPointImpl<T, &__uuidof(_IDatabaseEvents)>
|
|
24
|
+
{
|
|
25
|
+
public:
|
|
26
|
+
HRESULT Fire_OnCopyData(IDatabase * db, int recordCount, int count, VARIANT_BOOL * cancel)
|
|
27
|
+
{
|
|
28
|
+
HRESULT hr = S_OK;
|
|
29
|
+
T * pThis = static_cast<T *>(this);
|
|
30
|
+
int cConnections = m_vec.GetSize();
|
|
31
|
+
|
|
32
|
+
for (int iConnection = 0; iConnection < cConnections; iConnection++)
|
|
33
|
+
{
|
|
34
|
+
pThis->Lock();
|
|
35
|
+
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection);
|
|
36
|
+
pThis->Unlock();
|
|
37
|
+
|
|
38
|
+
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p);
|
|
39
|
+
|
|
40
|
+
if (pConnection)
|
|
41
|
+
{
|
|
42
|
+
CComVariant avarParams[4];
|
|
43
|
+
avarParams[3] = db;
|
|
44
|
+
avarParams[2] = recordCount;
|
|
45
|
+
avarParams[1] = count;
|
|
46
|
+
avarParams[0].byref = cancel;
|
|
47
|
+
avarParams[0].vt = VT_BOOL|VT_BYREF;
|
|
48
|
+
CComVariant varResult;
|
|
49
|
+
|
|
50
|
+
DISPPARAMS params = { avarParams, NULL, 4, 0 };
|
|
51
|
+
hr = pConnection->Invoke(1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return hr;
|
|
55
|
+
}
|
|
56
|
+
HRESULT Fire_OnDeleteRecord(IDatabase * db, ITable * tb, VARIANT_BOOL * Value)
|
|
57
|
+
{
|
|
58
|
+
HRESULT hr = S_OK;
|
|
59
|
+
T * pThis = static_cast<T *>(this);
|
|
60
|
+
int cConnections = m_vec.GetSize();
|
|
61
|
+
|
|
62
|
+
for (int iConnection = 0; iConnection < cConnections; iConnection++)
|
|
63
|
+
{
|
|
64
|
+
pThis->Lock();
|
|
65
|
+
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection);
|
|
66
|
+
pThis->Unlock();
|
|
67
|
+
|
|
68
|
+
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p);
|
|
69
|
+
|
|
70
|
+
if (pConnection)
|
|
71
|
+
{
|
|
72
|
+
CComVariant avarParams[3];
|
|
73
|
+
avarParams[2] = db;
|
|
74
|
+
avarParams[1] = tb;
|
|
75
|
+
avarParams[0].byref = Value;
|
|
76
|
+
avarParams[0].vt = VT_BOOL|VT_BYREF;
|
|
77
|
+
CComVariant varResult;
|
|
78
|
+
|
|
79
|
+
DISPPARAMS params = { avarParams, NULL, 3, 0 };
|
|
80
|
+
hr = pConnection->Invoke(2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return hr;
|
|
84
|
+
}
|
|
85
|
+
HRESULT Fire_OnSchemaMgrFn(IDatabase * db, short* Value)
|
|
86
|
+
{
|
|
87
|
+
HRESULT hr = S_OK;
|
|
88
|
+
T * pThis = static_cast<T *>(this);
|
|
89
|
+
int cConnections = m_vec.GetSize();
|
|
90
|
+
|
|
91
|
+
for (int iConnection = 0; iConnection < cConnections; iConnection++)
|
|
92
|
+
{
|
|
93
|
+
pThis->Lock();
|
|
94
|
+
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection);
|
|
95
|
+
pThis->Unlock();
|
|
96
|
+
|
|
97
|
+
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p);
|
|
98
|
+
|
|
99
|
+
if (pConnection)
|
|
100
|
+
{
|
|
101
|
+
CComVariant avarParams[2];
|
|
102
|
+
avarParams[1] = db;
|
|
103
|
+
avarParams[0].byref = Value;
|
|
104
|
+
avarParams[0].vt = VT_I2|VT_BYREF;
|
|
105
|
+
CComVariant varResult;
|
|
106
|
+
|
|
107
|
+
DISPPARAMS params = { avarParams, NULL, 2, 0 };
|
|
108
|
+
hr = pConnection->Invoke(3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return hr;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*=================================================================
|
|
2
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
3
|
+
|
|
4
|
+
This program is free software; you can redistribute it and/or
|
|
5
|
+
modify it under the terms of the GNU General Public License
|
|
6
|
+
as published by the Free Software Foundation; either version 2
|
|
7
|
+
of the License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program; if not, write to the Free Software
|
|
16
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
02111-1307, USA.
|
|
18
|
+
=================================================================*/
|
|
19
|
+
#include "stdafx.h"
|
|
20
|
+
#include "resource.h"
|
|
21
|
+
#include "tdclatl_i.h"
|
|
22
|
+
#include "dllmain.h"
|
|
23
|
+
|
|
24
|
+
CtdclatlModule _AtlModule;
|
|
25
|
+
|
|
26
|
+
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
|
27
|
+
{
|
|
28
|
+
hInstance;
|
|
29
|
+
return _AtlModule.DllMain(dwReason, lpReserved);
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*=================================================================
|
|
2
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
3
|
+
|
|
4
|
+
This program is free software; you can redistribute it and/or
|
|
5
|
+
modify it under the terms of the GNU General Public License
|
|
6
|
+
as published by the Free Software Foundation; either version 2
|
|
7
|
+
of the License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program; if not, write to the Free Software
|
|
16
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
02111-1307, USA.
|
|
18
|
+
=================================================================*/
|
|
19
|
+
|
|
20
|
+
class CtdclatlModule : public ATL::CAtlDllModuleT< CtdclatlModule >
|
|
21
|
+
{
|
|
22
|
+
public :
|
|
23
|
+
DECLARE_LIBID(LIBID_transactd)
|
|
24
|
+
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_TDCLATL, "{0F94D9C4-FB96-4084-A939-EEC3992454B4}")
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
extern class CtdclatlModule _AtlModule;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
/*=================================================================
|
|
3
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
4
|
+
|
|
5
|
+
This program is free software; you can redistribute it and/or
|
|
6
|
+
modify it under the terms of the GNU General Public License
|
|
7
|
+
as published by the Free Software Foundation; either version 2
|
|
8
|
+
of the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU General Public License
|
|
16
|
+
along with this program; if not, write to the Free Software
|
|
17
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
18
|
+
02111-1307, USA.
|
|
19
|
+
=================================================================*/
|
|
20
|
+
#include "resource.h"
|
|
21
|
+
|
|
22
|
+
#include "tdclatl_i.h"
|
|
23
|
+
#include <bzs/db/protocol/tdap/tdapSchema.h>
|
|
24
|
+
#include <bzs/db/protocol/tdap/client/dbDef.h>
|
|
25
|
+
using namespace ATL;
|
|
26
|
+
|
|
27
|
+
class ATL_NO_VTABLE CKeySegment : public CComObjectRootEx<CComSingleThreadModel>,
|
|
28
|
+
public CComCoClass<CKeySegment, &CLSID_KeySegment>,
|
|
29
|
+
public IDispatchImpl<IKeySegment, &IID_IKeySegment, &LIBID_transactd, /* wMajor = */ 1, /* wMinor = */ 0>
|
|
30
|
+
{
|
|
31
|
+
bzs::db::protocol::tdap::keySegment* segment(){return &(*m_tabledefPtr)->keyDefs[m_keyIndex].segments[m_index];};
|
|
32
|
+
public:
|
|
33
|
+
CKeySegment(): m_tabledefPtr(NULL){}
|
|
34
|
+
bzs::db::protocol::tdap::tabledef** m_tabledefPtr;
|
|
35
|
+
short m_keyIndex;
|
|
36
|
+
short m_index;
|
|
37
|
+
|
|
38
|
+
BEGIN_COM_MAP(CKeySegment)
|
|
39
|
+
COM_INTERFACE_ENTRY(IKeySegment)
|
|
40
|
+
COM_INTERFACE_ENTRY(IDispatch)
|
|
41
|
+
END_COM_MAP()
|
|
42
|
+
|
|
43
|
+
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
44
|
+
|
|
45
|
+
HRESULT FinalConstruct() {return S_OK;}
|
|
46
|
+
|
|
47
|
+
void FinalRelease() {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
|
|
51
|
+
STDMETHOD(get_FieldNum)(unsigned char* Value);
|
|
52
|
+
STDMETHOD(get_Flags)(IFlags** Value);
|
|
53
|
+
|
|
54
|
+
STDMETHOD(put_FieldNum)(unsigned char Value);
|
|
55
|
+
STDMETHOD(put_Flags)(IFlags* Value);
|
|
56
|
+
|
|
57
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// stdafx.h : �W���̃V�X�e�� �C���N���[�h �t�@�C���̃C���N���[�h �t�@�C���A�܂���
|
|
2
|
+
// �Q�Ɖ������A�����܂�ύX����Ȃ��A�v���W�F�N�g��p�̃C���N���[�h �t�@�C��
|
|
3
|
+
// ���L�q���܂��B
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#ifndef STRICT
|
|
8
|
+
#define STRICT
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
#include "targetver.h"
|
|
12
|
+
|
|
13
|
+
#define _ATL_APARTMENT_THREADED
|
|
14
|
+
|
|
15
|
+
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
|
16
|
+
|
|
17
|
+
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // �ꕔ�� CString �R���X�g���N�^�[�͖����I�ł��B
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW
|
|
21
|
+
|
|
22
|
+
#include "resource.h"
|
|
23
|
+
#include <atlbase.h>
|
|
24
|
+
#include <atlcom.h>
|
|
25
|
+
#include <atlctl.h>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*=================================================================
|
|
2
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
3
|
+
|
|
4
|
+
This program is free software; you can redistribute it and/or
|
|
5
|
+
modify it under the terms of the GNU General Public License
|
|
6
|
+
as published by the Free Software Foundation; either version 2
|
|
7
|
+
of the License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program; if not, write to the Free Software
|
|
16
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
02111-1307, USA.
|
|
18
|
+
=================================================================*/
|
|
19
|
+
#include "stdafx.h"
|
|
20
|
+
#include "resource.h"
|
|
21
|
+
#include "tdclatl_i.h"
|
|
22
|
+
#include "dllmain.h"
|
|
23
|
+
|
|
24
|
+
STDAPI DllCanUnloadNow(void) {return _AtlModule.DllCanUnloadNow();}
|
|
25
|
+
|
|
26
|
+
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) {
|
|
27
|
+
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);}
|
|
28
|
+
|
|
29
|
+
STDAPI DllRegisterServer(void)
|
|
30
|
+
{
|
|
31
|
+
HRESULT hr = _AtlModule.DllRegisterServer();
|
|
32
|
+
return hr;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
STDAPI DllUnregisterServer(void)
|
|
36
|
+
{
|
|
37
|
+
HRESULT hr = _AtlModule.DllUnregisterServer();
|
|
38
|
+
return hr;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine)
|
|
42
|
+
{
|
|
43
|
+
HRESULT hr = E_FAIL;
|
|
44
|
+
static const wchar_t szUserSwitch[] = L"user";
|
|
45
|
+
|
|
46
|
+
if (pszCmdLine != NULL)
|
|
47
|
+
{
|
|
48
|
+
if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
|
|
49
|
+
{
|
|
50
|
+
ATL::AtlSetPerUserRegistration(true);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (bInstall)
|
|
55
|
+
{
|
|
56
|
+
hr = DllRegisterServer();
|
|
57
|
+
if (FAILED(hr))
|
|
58
|
+
{
|
|
59
|
+
DllUnregisterServer();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
{
|
|
64
|
+
hr = DllUnregisterServer();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return hr;
|
|
68
|
+
}
|