︙ | | | ︙ | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/System.Data.SQLite.DLL"
GenerateManifest="false"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
|
|
<
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/System.Data.SQLite.DLL"
GenerateManifest="false"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
|
︙ | | | ︙ | |
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_WINDOWS;_USRDLL;CPPSMART_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);UNICODE;_UNICODE;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies=""fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib""
OutputFile="../bin/CompactFramework/System.Data.SQLite.DLL"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
AddModuleNamesToAssembly=""
EmbedManagedResourceFile=""
SubSystem="9"
MergeSections=""
TargetMachine="3"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Merging binaries ..."
CommandLine="..\bin\tools\mergebin.exe /S:.clr ..\System.Data.SQLite\bin\CompactFramework\$(TargetFileName) "$(TargetPath)"
sn -Ra "$(TargetPath)" ..\System.Data.SQLite\System.Data.SQLite.CF.snk
"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory="\Program Files\testce"
RegisterOutput="0"
AdditionalFiles=""
/>
|
|
<
<
<
|
|
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_WINDOWS;_USRDLL;CPPSMART_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);UNICODE;_UNICODE;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/CompactFramework/System.Data.SQLite.DLL"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
AddModuleNamesToAssembly=""
EmbedManagedResourceFile=""
SubSystem="9"
TargetMachine="3"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Merging binaries ..."
CommandLine="..\bin\tools\mergebin.exe /A:1120 /S:.clr ..\System.Data.SQLite\bin\CompactFramework\$(TargetFileName) "$(TargetPath)"
sn -Ra "$(TargetPath)" ..\System.Data.SQLite\System.Data.SQLite.CF.snk
"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory="\Program Files\testce"
RegisterOutput="0"
AdditionalFiles=""
/>
|
︙ | | | ︙ | |
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
TargetEnvironment="2"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/Itanium/System.Data.SQLite.DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
ImportLibrary=""
TargetMachine="5"
|
|
<
|
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
TargetEnvironment="2"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/Itanium/System.Data.SQLite.DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
ImportLibrary=""
TargetMachine="5"
|
︙ | | | ︙ | |
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/x64/System.Data.SQLite.DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
ImportLibrary=""
TargetMachine="17"
|
|
<
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="2"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
StringPooling="true"
ExceptionHandling="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/x64/System.Data.SQLite.DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
OptimizeForWindows98="1"
ImportLibrary=""
TargetMachine="17"
|
︙ | | | ︙ | |
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
|
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/$(InputName).DLL"
LinkIncremental="1"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
|
|
<
|
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/$(InputName).DLL"
LinkIncremental="1"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
|
︙ | | | ︙ | |
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
|
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_WINDOWS;_USRDLL;CPPSMART_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);UNICODE;_UNICODE;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
AdditionalDependencies=""fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib""
OutputFile="../bin/CompactFramework/$(InputName).DLL"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
AddModuleNamesToAssembly=""
EmbedManagedResourceFile=""
GenerateDebugInformation="true"
|
|
<
|
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
|
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_WINDOWS;_USRDLL;CPPSMART_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);UNICODE;_UNICODE;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
OutputFile="../bin/CompactFramework/$(InputName).DLL"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="src\sqlite3.def"
AddModuleNamesToAssembly=""
EmbedManagedResourceFile=""
GenerateDebugInformation="true"
|
︙ | | | ︙ | |
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
|
Name="VCMIDLTool"
TargetEnvironment="2"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/Itanium/$(InputName).DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
TargetMachine="5"
|
|
<
|
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
Name="VCMIDLTool"
TargetEnvironment="2"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/Itanium/$(InputName).DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
TargetMachine="5"
|
︙ | | | ︙ | |
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS1;SQLITE_ENABLE_FTS2;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="advapi32.lib "fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib" "fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib" $(NOINHERIT)"
OutputFile="../bin/x64/$(InputName).DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
TargetMachine="17"
|
|
<
|
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
|
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/GS-"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE=1;WIN64;SQLITE_HAS_CODEC;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS2;SQLITE_ENABLE_FTS1;SQLITE_OMIT_TRACE"
RuntimeLibrary="3"
RuntimeTypeInfo="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="../bin/x64/$(InputName).DLL"
ModuleDefinitionFile="src\sqlite3.def"
EmbedManagedResourceFile=""
DelayLoadDLLs="advapi32.dll"
GenerateDebugInformation="true"
ImportLibrary=""
TargetMachine="17"
|
︙ | | | ︙ | |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "src/sqlite3.c"
#include "crypt.c"
#include <tchar.h>
#if NDEBUG
#if _WIN32_WCE
#include "merge.h"
// IMPORTANT: This placeholder is here for a reason!!!
// On the Compact Framework the .data section of the DLL must have its RawDataSize larger than the VirtualSize!
// If its not, strong name validation will fail and other bad things will happen.
DWORD _ph[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
#else
#include "merge_full.h"
#endif // _WIN32_WCE
#endif // NDEBUG
#ifdef OS_WIN
#include <tchar.h>
// Additional flag for sqlite3.flags, we use it as a reference counter
#define SQLITE_WantClose 0x10000000
typedef void (WINAPI *SQLITEUSERFUNC)(void *, int, void **);
typedef int (WINAPI *SQLITECOLLATION)(int, const void *, int, const void*);
typedef void (WINAPI *SQLITEUPDATEHOOK)(int, const char *, int, const char *, int, sqlite_int64);
|
>
<
<
<
<
<
<
<
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//#include "../temp/sqlite.interop/src/sqlite3.c"
#include "src/sqlite3.c"
#include "crypt.c"
#include <tchar.h>
#if NDEBUG
#if _WIN32_WCE
#include "merge.h"
#else
#include "merge_full.h"
#endif // _WIN32_WCE
#endif // NDEBUG
#ifdef OS_WIN
// Additional flag for sqlite3.flags, we use it as a reference counter
#define SQLITE_WantClose 0x10000000
typedef void (WINAPI *SQLITEUSERFUNC)(void *, int, void **);
typedef int (WINAPI *SQLITECOLLATION)(int, const void *, int, const void*);
typedef void (WINAPI *SQLITEUPDATEHOOK)(int, const char *, int, const char *, int, sqlite_int64);
|
︙ | | | ︙ | |
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
__declspec(dllexport) void WINAPI sqlite3_sleep_interop(int milliseconds)
{
Sleep(milliseconds);
}
void InitializeDbMutex(sqlite3 *pdb)
{
pdb->pTraceArg = (CRITICAL_SECTION *)sqliteMalloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(pdb->pTraceArg);
}
void EnterDbMutex(sqlite3 *pdb)
{
if (pdb->pTraceArg)
{
EnterCriticalSection(pdb->pTraceArg);
}
}
void LeaveDbMutex(sqlite3 *pdb)
{
if (pdb->pTraceArg)
{
LeaveCriticalSection(pdb->pTraceArg);
}
}
int sqlite3_closeAndFreeMutex(sqlite3 *db)
{
CRITICAL_SECTION *pcrit = db->pTraceArg;
int ret;
EnterDbMutex(db);
ret = sqlite3_close(db);
if (ret == SQLITE_OK)
{
if (pcrit)
{
LeaveCriticalSection(pcrit);
DeleteCriticalSection(pcrit);
free(pcrit);
}
}
else
LeaveDbMutex(db);
return ret;
}
int SetCompression(const wchar_t *pwszFilename, unsigned short ufLevel)
{
#ifdef FSCTL_SET_COMPRESSION
HMODULE hMod = GetModuleHandle(_T("KERNEL32"));
CREATEFILEW pfunc;
|
|
|
|
<
>
|
<
>
|
<
>
|
>
|
|
<
|
|
|
|
|
<
>
|
<
>
|
|
|
<
<
>
>
|
|
|
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
__declspec(dllexport) void WINAPI sqlite3_sleep_interop(int milliseconds)
{
Sleep(milliseconds);
}
void InitializeDbMutex(sqlite3 *pdb)
{
//pdb->pTraceArg = (CRITICAL_SECTION *)sqlite3_malloc(sizeof(CRITICAL_SECTION));
//InitializeCriticalSection(pdb->pTraceArg);
}
void EnterDbMutex(sqlite3 *pdb)
{
//if (pdb->pTraceArg)
//{
// EnterCriticalSection(pdb->pTraceArg);
//}
}
void LeaveDbMutex(sqlite3 *pdb)
{
//if (pdb->pTraceArg)
//{
// LeaveCriticalSection(pdb->pTraceArg);
//}
}
int sqlite3_closeAndFreeMutex(sqlite3 *db)
{
//CRITICAL_SECTION *pcrit = db->pTraceArg;
//int ret;
//EnterDbMutex(db);
//ret = sqlite3_close(db);
//if (ret == SQLITE_OK)
//{
// if (pcrit)
// {
// LeaveCriticalSection(pcrit);
// DeleteCriticalSection(pcrit);
// sqlite3_free(pcrit);
// }
//}
//else
// LeaveDbMutex(db);
return 0;
}
int SetCompression(const wchar_t *pwszFilename, unsigned short ufLevel)
{
#ifdef FSCTL_SET_COMPRESSION
HMODULE hMod = GetModuleHandle(_T("KERNEL32"));
CREATEFILEW pfunc;
|
︙ | | | ︙ | |
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
}
__declspec(dllexport) int WINAPI sqlite3_libversion_number_interop(void)
{
return sqlite3_libversion_number();
}
__declspec(dllexport) int WINAPI sqlite3_close_interop(sqlite3 *db)
{
// Try and close the database. If there are unfinalized statements, mark the database to be closed as
// soon as the last finalized statement is closed
int ret = sqlite3_closeAndFreeMutex(db);
if (ret == SQLITE_BUSY)
{
if (db->pVdbe)
{
db->flags |= SQLITE_WantClose;
ret = 0;
}
}
return ret;
}
// Returns the number of databases attached to this one
__declspec(dllexport) void WINAPI sqlite3_detach_all_interop(sqlite3 *db)
|
>
>
>
>
>
>
>
>
>
>
>
>
>
<
<
>
|
|
>
>
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
|
>
>
>
>
>
>
>
|
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
}
__declspec(dllexport) int WINAPI sqlite3_libversion_number_interop(void)
{
return sqlite3_libversion_number();
}
/*
The goal of this version of close is different than that of sqlite3_close(), and is designed to lend itself better to .NET's non-deterministic finalizers and
the GC thread. SQLite will not close a database if statements are open on it -- but for our purposes, we'd rather finalize all active statements
and forcibly close the database. The reason is simple -- a lot of people don't Dispose() of their objects correctly and let the garbage collector
do it. This leads to unexpected behavior when a user thinks they've closed a database, but it's still open because not all the statements have
hit the GC yet.
So, here we have a problem ... .NET has a pointer to any number of sqlite3_stmt objects. We can't call sqlite3_finalize() on these because
their memory is freed and can be used for something else. The GC thread could potentially try and call finalize again on the statement after
that memory was deallocated. BAD. So, what we need to do is make a copy of each statement, and call finalize() on the copy -- so that the original
statement's memory is preserved, and marked as BAD, but we can still manage to finalize everything and forcibly close the database. Later when the
GC gets around to calling finalize_interop() on the "bad" statement, we detect that and finish deallocating the pointer.
*/
__declspec(dllexport) int WINAPI sqlite3_close_interop(sqlite3 *db)
{
int ret = sqlite3_closeAndFreeMutex(db);
if (ret == SQLITE_BUSY && db->pVdbe)
{
while (db->pVdbe)
{
// Make a copy of the first prepared statement
Vdbe *p = (Vdbe *)sqlite3_malloc(sizeof(Vdbe));
Vdbe *po = db->pVdbe;
if (!p) return SQLITE_NOMEM;
CopyMemory(p, po, sizeof(Vdbe));
// Put it on the chain so we can free it
db->pVdbe = p;
ret = sqlite3_finalize((sqlite3_stmt *)p); // This will also free the copy's memory
if (ret)
{
// finalize failed -- so we must put back anything we munged
CopyMemory(po, p, sizeof(Vdbe));
db->pVdbe = po;
break;
}
else
{
ZeroMemory(po, sizeof(Vdbe));
po->magic = VDBE_MAGIC_DEAD;
}
}
ret = sqlite3_closeAndFreeMutex(db);
}
return ret;
}
// Returns the number of databases attached to this one
__declspec(dllexport) void WINAPI sqlite3_detach_all_interop(sqlite3 *db)
|
︙ | | | ︙ | |
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
__declspec(dllexport) int WINAPI sqlite3_finalize_interop(sqlite3_stmt *stmt)
{
// Try and finalize a statement, and close the database it belonged to if the database was marked for closing
Vdbe *p = (Vdbe *)stmt;
sqlite3 *db = (p == NULL) ? NULL : p->db;
int ret;
EnterDbMutex(db);
ret = sqlite3_finalize(stmt);
LeaveDbMutex(db);
if (ret == SQLITE_OK)
{
if (db->flags & SQLITE_WantClose)
|
>
>
>
>
>
|
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
|
__declspec(dllexport) int WINAPI sqlite3_finalize_interop(sqlite3_stmt *stmt)
{
// Try and finalize a statement, and close the database it belonged to if the database was marked for closing
Vdbe *p = (Vdbe *)stmt;
sqlite3 *db = (p == NULL) ? NULL : p->db;
int ret;
if (p->magic == VDBE_MAGIC_DEAD && p->db == NULL)
{
sqlite3_free(p);
return SQLITE_OK;
}
EnterDbMutex(db);
ret = sqlite3_finalize(stmt);
LeaveDbMutex(db);
if (ret == SQLITE_OK)
{
if (db->flags & SQLITE_WantClose)
|
︙ | | | ︙ | |
857
858
859
860
861
862
863
864
|
break;
}
LeaveDbMutex(db);
return ret;
}
#endif // OS_WIN
|
>
>
>
>
>
>
>
>
|
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
|
break;
}
LeaveDbMutex(db);
return ret;
}
// IMPORTANT: This placeholder is here for a reason!!!
// On the Compact Framework the .data section of the DLL must have its RawDataSize larger than the VirtualSize!
// If its not, strong name validation will fail and other bad things will happen.
#if _WIN32_WCE
__int64 _ph[84] = {1};
#endif // _WIN32_WCE
#endif // OS_WIN
|
︙ | | | ︙ | |
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.IO;
using System.GACManagedAccess;
using System.Xml;
using System.Diagnostics;
public partial class InstallDesigner : Form
{
private static Guid standardDataProviderGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C70}");
private static Guid standardDataSourcesGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C71}");
private static Guid standardCFDataSourcesGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C72}");
private static Guid oledbDataProviderGuid = new Guid("{7F041D59-D76A-44ed-9AA2-FBF6B0548B80}");
private static Guid oledbAltDataProviderGuid = new Guid("{7F041D59-D76A-44ed-9AA2-FBF6B0548B81}");
private static Guid jetDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC3}");
private static Guid jetAltDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC4}");
private static string[] compactFrameworks = new string[] { "PocketPC", "SmartPhone", "WindowsCE" };
internal bool _remove = false;
private string _regRoot = "8.0";
private System.Reflection.Assembly _assm = null;
private bool _ignoreChecks = true;
private string _assmLocation;
string SQLiteLocation
{
get
{
System.Reflection.Assembly assm = SQLite;
return _assmLocation;
|
>
|
>
>
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.IO;
using System.GACManagedAccess;
using System.Xml;
using System.Diagnostics;
using System.Collections.Generic;
public partial class InstallDesigner : Form
{
private static Guid standardDataProviderGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C70}");
private static Guid standardDataSourcesGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C71}");
private static Guid standardCFDataSourcesGuid = new Guid("{0EBAAB6E-CA80-4b4a-8DDF-CBE6BF058C72}");
private static Guid oledbDataProviderGuid = new Guid("{7F041D59-D76A-44ed-9AA2-FBF6B0548B80}");
private static Guid oledbAltDataProviderGuid = new Guid("{7F041D59-D76A-44ed-9AA2-FBF6B0548B81}");
private static Guid jetDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC3}");
private static Guid jetAltDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC4}");
private static string[] compactFrameworks = new string[] { "PocketPC", "SmartPhone", "WindowsCE" };
internal bool _remove = false;
//private string _regRoot = "8.0";
private System.Reflection.Assembly _assm = null;
private bool _ignoreChecks = true;
private string _assmLocation;
private Dictionary<string, string> _regRoots = new Dictionary<string,string>();
string SQLiteLocation
{
get
{
System.Reflection.Assembly assm = SQLite;
return _assmLocation;
|
︙ | | | ︙ | |
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
_assm = value;
}
}
public InstallDesigner()
{
string[] args = Environment.GetCommandLineArgs();
for (int n = 0; n < args.Length; n++)
{
if (String.Compare(args[n], "/regroot", true) == 0 ||
String.Compare(args[n], "-regroot", true) == 0)
{
_regRoot = args[n + 1];
break;
}
else if (String.Compare(args[n], "/remove", true) == 0 ||
String.Compare(args[n], "-remove", true) == 0)
{
_remove = true;
}
}
InitializeComponent();
RegistryKey key;
using (key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft"))
{
AddItem(key, "VisualStudio", "Visual Studio (full editions)", standardDataProviderGuid, null);
AddItem(key, "VWDExpress", "Visual Web Developer Express Edition", standardDataProviderGuid, null);
warningPanel.Visible = (AddItem(key, "VCSExpress", "Visual C# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, "VCExpress", "Visual C++ Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, "VBExpress", "Visual Basic Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, "VJSExpress", "Visual J# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid));
}
GlobalAddRemove();
_ignoreChecks = false;
}
private bool AddItem(RegistryKey parent, string subkeyname, string itemName, Guid lookFor, object isChecked)
{
RegistryKey subkey;
try
{
using (subkey = parent.OpenSubKey(String.Format("{0}\\{1}", subkeyname, _regRoot)))
{
ListViewItem item = new ListViewItem(itemName);
item.Tag = subkeyname;
using (RegistryKey subsubkey = subkey.OpenSubKey("DataProviders"))
{
if (subsubkey == null)
throw new ArgumentException("Edition not installed");
}
|
>
>
>
|
>
>
|
|
|
|
|
|
|
|
|
>
|
<
|
|
|
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
_assm = value;
}
}
public InstallDesigner()
{
string[] args = Environment.GetCommandLineArgs();
_regRoots.Add("8.0", "2005");
_regRoots.Add("9.0", "2008");
for (int n = 0; n < args.Length; n++)
{
if (String.Compare(args[n], "/regroot", true) == 0 ||
String.Compare(args[n], "-regroot", true) == 0)
{
_regRoots.Add(args[n + 1], args[n + 1]);
break;
}
else if (String.Compare(args[n], "/remove", true) == 0 ||
String.Compare(args[n], "-remove", true) == 0)
{
_remove = true;
}
}
InitializeComponent();
RegistryKey key;
foreach (KeyValuePair<string, string> pair in _regRoots)
{
using (key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft"))
{
AddItem(key, pair.Key, "VisualStudio", String.Format("Visual Studio {0} (full editions)", pair.Value), standardDataProviderGuid, null);
AddItem(key, pair.Key, "VWDExpress", String.Format("Visual Web Developer Express {0} Edition", pair.Value), standardDataProviderGuid, null);
warningPanel.Visible = (AddItem(key, pair.Key, "VCSExpress", String.Format("Visual C# Express {0} Edition *", pair.Value), oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, pair.Key, "VCExpress", String.Format("Visual C++ Express {0} Edition *", pair.Value), oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, pair.Key, "VBExpress", String.Format("Visual Basic Express {0} Edition *", pair.Value), oledbDataProviderGuid, oledbAltDataProviderGuid)
| AddItem(key, pair.Key, "VJSExpress", String.Format("Visual J# Express {0} Edition *", pair.Value), oledbDataProviderGuid, oledbAltDataProviderGuid));
}
GlobalAddRemove(pair.Key);
}
_ignoreChecks = false;
}
private bool AddItem(RegistryKey parent, string version, string subkeyname, string itemName, Guid lookFor, object isChecked)
{
RegistryKey subkey;
try
{
using (subkey = parent.OpenSubKey(String.Format("{0}\\{1}", subkeyname, version)))
{
ListViewItem item = new ListViewItem(itemName);
item.Tag = new string[] { subkeyname, version };
using (RegistryKey subsubkey = subkey.OpenSubKey("DataProviders"))
{
if (subsubkey == null)
throw new ArgumentException("Edition not installed");
}
|
︙ | | | ︙ | |
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
this.Close();
}
private void installList_ItemChecked(object sender, ItemCheckedEventArgs e)
{
if (_ignoreChecks) return;
DoInstallUninstall(e.Item);
GlobalAddRemove();
}
private void DoInstallUninstall(ListViewItem Item)
{
if (Item.Checked == false)
{
if (Item.Text.IndexOf('*') > -1)
RestoreJet((string)Item.Tag);
else
Uninstall((string)Item.Tag, standardDataProviderGuid, standardDataSourcesGuid);
}
else
{
if (Item.Text.IndexOf('*') > -1)
ReplaceJet((string)Item.Tag);
else
Install((string)Item.Tag, standardDataProviderGuid, standardDataSourcesGuid);
}
}
private void GlobalAddRemove()
{
bool install = false;
// bool installed;
//// Check to see if SQLite is installed in the GAC
//try
//{
|
>
>
|
>
|
|
|
|
|
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
this.Close();
}
private void installList_ItemChecked(object sender, ItemCheckedEventArgs e)
{
if (_ignoreChecks) return;
string[] arr = (string[])e.Item.Tag;
DoInstallUninstall(e.Item);
GlobalAddRemove(arr[1]);
}
private void DoInstallUninstall(ListViewItem Item)
{
string[] arr = (string[])Item.Tag;
if (Item.Checked == false)
{
if (Item.Text.IndexOf('*') > -1)
RestoreJet(arr[0], arr[1]);
else
Uninstall(arr[0], arr[1], standardDataProviderGuid, standardDataSourcesGuid);
}
else
{
if (Item.Text.IndexOf('*') > -1)
ReplaceJet(arr[0], arr[1]);
else
Install(arr[0], arr[1], standardDataProviderGuid, standardDataSourcesGuid);
}
}
private void GlobalAddRemove(string version)
{
bool install = false;
// bool installed;
//// Check to see if SQLite is installed in the GAC
//try
//{
|
︙ | | | ︙ | |
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
}
}
catch
{
throw;
}
FixXmlLibPaths(install);
}
private void ReplaceJet(string keyname)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, _regRoot), true))
{
using (RegistryKey source = key.OpenSubKey(oledbDataProviderGuid.ToString("B")))
{
using (RegistryKey dest = key.CreateSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source == null) return;
CopyKey(source, dest);
}
}
key.DeleteSubKeyTree(oledbDataProviderGuid.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
{
using (RegistryKey source = key.OpenSubKey(jetDataSourcesGuid.ToString("B")))
{
using (RegistryKey dest = key.CreateSubKey(jetAltDataSourcesGuid.ToString("B")))
{
if (source == null) return;
CopyKey(source, dest);
}
}
key.DeleteSubKeyTree(jetDataSourcesGuid.ToString("B"));
}
Install(keyname, oledbDataProviderGuid, jetDataSourcesGuid);
}
private void RestoreJet(string keyname)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, _regRoot), true))
{
using (RegistryKey source = key.OpenSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source == null) return;
}
}
Uninstall(keyname, oledbDataProviderGuid, jetDataSourcesGuid);
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, _regRoot), true))
{
using (RegistryKey source = key.OpenSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source != null)
{
using (RegistryKey dest = key.CreateSubKey(oledbDataProviderGuid.ToString("B")))
{
CopyKey(source, dest);
}
key.DeleteSubKeyTree(oledbAltDataProviderGuid.ToString("B"));
}
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
{
using (RegistryKey source = key.OpenSubKey(jetAltDataSourcesGuid.ToString("B")))
{
if (source != null)
{
using (RegistryKey dest = key.CreateSubKey(jetDataSourcesGuid.ToString("B")))
{
CopyKey(source, dest);
}
key.DeleteSubKeyTree(jetAltDataSourcesGuid.ToString("B"));
}
}
}
}
private void Install(string keyname, Guid provider, Guid source)
{
bool usePackage = (keyname == "VisualStudio");
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, _regRoot), true))
{
using (RegistryKey subkey = key.CreateSubKey(provider.ToString("B"), RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, ".NET Framework Data Provider for SQLite");
subkey.SetValue("InvariantName", "System.Data.SQLite");
subkey.SetValue("Technology", "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}");
subkey.SetValue("CodeBase", Path.GetFullPath("SQLite.Designer.DLL"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
|
}
}
catch
{
throw;
}
FixXmlLibPaths(install, version);
}
private void ReplaceJet(string keyname, string version)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, version), true))
{
using (RegistryKey source = key.OpenSubKey(oledbDataProviderGuid.ToString("B")))
{
using (RegistryKey dest = key.CreateSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source == null) return;
CopyKey(source, dest);
}
}
key.DeleteSubKeyTree(oledbDataProviderGuid.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, version), true))
{
using (RegistryKey source = key.OpenSubKey(jetDataSourcesGuid.ToString("B")))
{
using (RegistryKey dest = key.CreateSubKey(jetAltDataSourcesGuid.ToString("B")))
{
if (source == null) return;
CopyKey(source, dest);
}
}
key.DeleteSubKeyTree(jetDataSourcesGuid.ToString("B"));
}
Install(keyname, version, oledbDataProviderGuid, jetDataSourcesGuid);
}
private void RestoreJet(string keyname, string version)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, version), true))
{
using (RegistryKey source = key.OpenSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source == null) return;
}
}
Uninstall(keyname, version, oledbDataProviderGuid, jetDataSourcesGuid);
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, version), true))
{
using (RegistryKey source = key.OpenSubKey(oledbAltDataProviderGuid.ToString("B")))
{
if (source != null)
{
using (RegistryKey dest = key.CreateSubKey(oledbDataProviderGuid.ToString("B")))
{
CopyKey(source, dest);
}
key.DeleteSubKeyTree(oledbAltDataProviderGuid.ToString("B"));
}
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, version), true))
{
using (RegistryKey source = key.OpenSubKey(jetAltDataSourcesGuid.ToString("B")))
{
if (source != null)
{
using (RegistryKey dest = key.CreateSubKey(jetDataSourcesGuid.ToString("B")))
{
CopyKey(source, dest);
}
key.DeleteSubKeyTree(jetAltDataSourcesGuid.ToString("B"));
}
}
}
}
private void Install(string keyname, string version, Guid provider, Guid source)
{
bool usePackage = (keyname == "VisualStudio");
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, version), true))
{
using (RegistryKey subkey = key.CreateSubKey(provider.ToString("B"), RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, ".NET Framework Data Provider for SQLite");
subkey.SetValue("InvariantName", "System.Data.SQLite");
subkey.SetValue("Technology", "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}");
subkey.SetValue("CodeBase", Path.GetFullPath("SQLite.Designer.DLL"));
|
︙ | | | ︙ | |
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
|
if (!usePackage)
subsubsubkey.SetValue(null, "SQLite.Designer.SQLiteDataConnectionSupport");
}
}
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
{
using (RegistryKey subkey = key.CreateSubKey(source.ToString("B"), RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "SQLite Database File");
using (RegistryKey subsubkey = subkey.CreateSubKey("SupportingProviders", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subsubkey.CreateSubKey(provider.ToString("B")).Close();
|
|
|
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
if (!usePackage)
subsubsubkey.SetValue(null, "SQLite.Designer.SQLiteDataConnectionSupport");
}
}
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, version), true))
{
using (RegistryKey subkey = key.CreateSubKey(source.ToString("B"), RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "SQLite Database File");
using (RegistryKey subsubkey = subkey.CreateSubKey("SupportingProviders", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subsubkey.CreateSubKey(provider.ToString("B")).Close();
|
︙ | | | ︙ | |
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
|
}
}
}
}
if (usePackage)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Packages", keyname, _regRoot), true))
{
using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "SQLite Designer Package");
subkey.SetValue("Class", "SQLite.Designer.SQLitePackage");
subkey.SetValue("CodeBase", Path.GetFullPath("SQLite.Designer.DLL"));
subkey.SetValue("ID", 400);
subkey.SetValue("InprocServer32", "mscoree.dll");
subkey.SetValue("CompanyName", "Black Castle Software, LLC");
subkey.SetValue("MinEdition", "standard");
subkey.SetValue("ProductName", "SQLite Data Provider");
subkey.SetValue("ProductVersion", "1.0");
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Menus", keyname, _regRoot), true))
{
key.SetValue("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", ", 1000, 1");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Services", keyname, _regRoot), true))
{
using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9D}", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
subkey.SetValue("Name", "SQLite Provider Object Factory");
}
}
}
}
private XmlDocument GetConfig(string keyname, out string xmlFileName)
{
try
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}", keyname, _regRoot), true))
{
xmlFileName = (string)key.GetValue("InstallDir");
if (String.Compare(keyname, "VisualStudio", true) == 0)
xmlFileName += "devenv.exe.config";
else
xmlFileName += keyname + ".exe.config";
}
|
|
|
|
|
|
|
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
|
}
}
}
}
if (usePackage)
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Packages", keyname, version), true))
{
using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "SQLite Designer Package");
subkey.SetValue("Class", "SQLite.Designer.SQLitePackage");
subkey.SetValue("CodeBase", Path.GetFullPath("SQLite.Designer.DLL"));
subkey.SetValue("ID", 400);
subkey.SetValue("InprocServer32", "mscoree.dll");
subkey.SetValue("CompanyName", "Black Castle Software, LLC");
subkey.SetValue("MinEdition", "standard");
subkey.SetValue("ProductName", "SQLite Data Provider");
subkey.SetValue("ProductVersion", "1.0");
}
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Menus", keyname, version), true))
{
key.SetValue("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", ", 1000, 1");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Services", keyname, version), true))
{
using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9D}", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subkey.SetValue(null, "{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
subkey.SetValue("Name", "SQLite Provider Object Factory");
}
}
}
}
private XmlDocument GetConfig(string keyname, string version, out string xmlFileName)
{
try
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}", keyname, version), true))
{
xmlFileName = (string)key.GetValue("InstallDir");
if (String.Compare(keyname, "VisualStudio", true) == 0)
xmlFileName += "devenv.exe.config";
else
xmlFileName += keyname + ".exe.config";
}
|
︙ | | | ︙ | |
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
|
catch
{
xmlFileName = null;
}
return null;
}
private void Uninstall(string keyname, Guid provider, Guid source)
{
try
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, _regRoot), true))
{
if (key != null) key.DeleteSubKeyTree(provider.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
{
if (key != null) key.DeleteSubKeyTree(source.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Packages", keyname, _regRoot), true))
{
if (key != null) key.DeleteSubKeyTree("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Services", keyname, _regRoot), true))
{
if (key != null) key.DeleteSubKeyTree("{DCBE6C8D-0E57-4099-A183-98FF74C64D9D}");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Menus", keyname, _regRoot), true))
{
key.DeleteValue("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
}
//using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", true))
//{
// string libpath = (string)key.GetValue("LIB");
// string path = ";" + Path.GetDirectoryName(SQLiteLocation);
// libpath = libpath.Replace(path, "");
// key.SetValue("LIB", libpath);
//}
}
catch
{
}
// Remove factory support from the development environment config file
string xmlFileName;
XmlDocument xmlDoc = GetConfig(keyname, out xmlFileName);
if (xmlDoc == null) return;
XmlNode xmlNode = xmlDoc.SelectSingleNode("configuration/system.data/DbProviderFactories/add[@invariant=\"System.Data.SQLite\"]");
if (xmlNode != null)
xmlNode.ParentNode.RemoveChild(xmlNode);
|
|
|
|
|
|
|
|
|
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
catch
{
xmlFileName = null;
}
return null;
}
private void Uninstall(string keyname, string version, Guid provider, Guid source)
{
try
{
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataProviders", keyname, version), true))
{
if (key != null) key.DeleteSubKeyTree(provider.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, version), true))
{
if (key != null) key.DeleteSubKeyTree(source.ToString("B"));
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Packages", keyname, version), true))
{
if (key != null) key.DeleteSubKeyTree("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Services", keyname, version), true))
{
if (key != null) key.DeleteSubKeyTree("{DCBE6C8D-0E57-4099-A183-98FF74C64D9D}");
}
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\Menus", keyname, version), true))
{
key.DeleteValue("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}");
}
//using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", true))
//{
// string libpath = (string)key.GetValue("LIB");
// string path = ";" + Path.GetDirectoryName(SQLiteLocation);
// libpath = libpath.Replace(path, "");
// key.SetValue("LIB", libpath);
//}
}
catch
{
}
// Remove factory support from the development environment config file
string xmlFileName;
XmlDocument xmlDoc = GetConfig(keyname, version, out xmlFileName);
if (xmlDoc == null) return;
XmlNode xmlNode = xmlDoc.SelectSingleNode("configuration/system.data/DbProviderFactories/add[@invariant=\"System.Data.SQLite\"]");
if (xmlNode != null)
xmlNode.ParentNode.RemoveChild(xmlNode);
|
︙ | | | ︙ | |
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
|
string[] values = keySource.GetValueNames();
for (int n = 0; n < values.Length; n++)
{
keyDest.SetValue(values[n], keySource.GetValue(values[n]), keySource.GetValueKind(values[n]));
}
}
private void FixXmlLibPaths(bool install)
{
string installDir = null;
RegistryKey key = null;
try
{
key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\VisualStudio\\8.0");
if (key != null)
{
try
{
installDir = (string)key.GetValue("InstallDir");
}
catch
|
|
|
|
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
|
string[] values = keySource.GetValueNames();
for (int n = 0; n < values.Length; n++)
{
keyDest.SetValue(values[n], keySource.GetValue(values[n]), keySource.GetValueKind(values[n]));
}
}
private void FixXmlLibPaths(bool install, string version)
{
string installDir = null;
RegistryKey key = null;
try
{
key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\VisualStudio\\{0}", version));
if (key != null)
{
try
{
installDir = (string)key.GetValue("InstallDir");
}
catch
|
︙ | | | ︙ | |
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
|
key = null;
}
}
}
if (key == null)
{
key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\VCExpress\\8.0");
if (key == null) return;
}
try
{
installDir = (string)key.GetValue("InstallDir");
}
|
|
|
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
|
key = null;
}
}
}
if (key == null)
{
key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\VCExpress\\{0}", version));
if (key == null) return;
}
try
{
installDir = (string)key.GetValue("InstallDir");
}
|
︙ | | | ︙ | |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/********************************************************
* mergebin
* Written by Robert Simpson (robert@blackcastlesoft.com)
*
* Released to the public domain, use at your own risk!
********************************************************/
#include "stdafx.h"
#include "MetaData.h"
#include "MetaDataTables.h"
#include "TableData.h"
void DumpCLRInfo(LPCTSTR pszFile);
void MergeModules(LPCTSTR pszAssembly, LPCTSTR pszNative, LPCTSTR pszSection);
void DumpCLRPragma(LPCTSTR pszAssembly, LPCTSTR pszSection);
typedef struct EXTRA_STUFF
{
DWORD dwNativeEntryPoint;
} EXTRA_STUFF, *LPEXTRA_STUFF;
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/********************************************************
* mergebin
* Written by Robert Simpson (robert@blackcastlesoft.com)
*
* Released to the public domain, use at your own risk!
********************************************************/
#include "stdafx.h"
#include "MetaData.h"
#include "MetaDataTables.h"
#include "TableData.h"
void DumpCLRInfo(LPCTSTR pszFile);
void MergeModules(LPCTSTR pszAssembly, LPCTSTR pszNative, LPCTSTR pszSection, DWORD dwAdjust);
void DumpCLRPragma(LPCTSTR pszAssembly, LPCTSTR pszSection);
typedef struct EXTRA_STUFF
{
DWORD dwNativeEntryPoint;
} EXTRA_STUFF, *LPEXTRA_STUFF;
|
︙ | | | ︙ | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/I:assembly Returns the number of bytes required\n \
to consume the assembly\n \
/S:sectionname The name of the section in the nativedll\n \
to insert the CLR data\n \
/P:assembly Outputs the C++ pragma code that can be used\n \
as additional input to a C++ app to reserve\n \
a section block large enough for the managed code.\n \
\n \
The native DLL must have an unused section in it, into which the\n \
.NET assembly will be inserted. You can do this with the following code:\n \
#pragma data_seg(\".clr\")\n \
#pragma comment(linker, \"/SECTION:.clr,ER\")\n \
char __ph[92316] = {0}; // 92316 is the number of bytes to reserve\n \
#pragma data_seg()\n \
You would then specify /SECTION:.CLR in the command-line for the location to\n \
|
>
>
|
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/I:assembly Returns the number of bytes required\n \
to consume the assembly\n \
/S:sectionname The name of the section in the nativedll\n \
to insert the CLR data\n \
/P:assembly Outputs the C++ pragma code that can be used\n \
as additional input to a C++ app to reserve\n \
a section block large enough for the managed code.\n \
/A:# adjust .data segment virtual size to the specified\n \
amount for Windows CE fixing up.\n \
\n \
The native DLL must have an unused section in it, into which the\n \
.NET assembly will be inserted. You can do this with the following code:\n \
#pragma data_seg(\".clr\")\n \
#pragma comment(linker, \"/SECTION:.clr,ER\")\n \
char __ph[92316] = {0}; // 92316 is the number of bytes to reserve\n \
#pragma data_seg()\n \
You would then specify /SECTION:.CLR in the command-line for the location to\n \
|
︙ | | | ︙ | |
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
return 0;
}
LPTSTR pszAssembly = NULL;
LPTSTR pszNative = NULL;
LPTSTR pszSection = NULL;
BOOL bDoPragma = FALSE;
for (int n = 1; n < argc; n++)
{
if (argv[n][0] != '-' && argv[n][0] != '/')
{
if (pszAssembly == NULL)
pszAssembly = argv[n];
|
>
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
return 0;
}
LPTSTR pszAssembly = NULL;
LPTSTR pszNative = NULL;
LPTSTR pszSection = NULL;
BOOL bDoPragma = FALSE;
DWORD dwAdjust = 0;
for (int n = 1; n < argc; n++)
{
if (argv[n][0] != '-' && argv[n][0] != '/')
{
if (pszAssembly == NULL)
pszAssembly = argv[n];
|
︙ | | | ︙ | |
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
pszSection = &argv[n][3];
if (argv[n][2] != ':' || lstrlen(pszSection) == 0)
{
_tprintf(_T("/S requires a section name\n"));
return 0;
}
break;
}
}
if (pszAssembly && pszNative && pszSection && !bDoPragma)
MergeModules(pszAssembly, pszNative, pszSection);
if (pszAssembly && bDoPragma)
DumpCLRPragma(pszAssembly, pszSection);
return 0;
}
|
>
>
>
>
>
>
>
>
>
|
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
pszSection = &argv[n][3];
if (argv[n][2] != ':' || lstrlen(pszSection) == 0)
{
_tprintf(_T("/S requires a section name\n"));
return 0;
}
break;
case 'A':
case 'a':
if (argv[n][2] != ':')
{
_tprintf(_T("A parameter requires a numeric value\n"));
return 0;
}
dwAdjust = _ttol(&argv[n][3]);
break;
}
}
if (pszAssembly && pszNative && pszSection && !bDoPragma)
MergeModules(pszAssembly, pszNative, pszSection, dwAdjust);
if (pszAssembly && bDoPragma)
DumpCLRPragma(pszAssembly, pszSection);
return 0;
}
|
︙ | | | ︙ | |
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
_tprintf(_T("// Unable to retrieve .NET assembly information for file %s\n"), pszAssembly);
return;
}
_tprintf(_T("// This code was automatically generated from assembly\n\
// %s\n\n\
#include <windef.h>\n\n\
#pragma data_seg(\"%s\")\n\
#pragma comment(linker, \"/SECTION:%s,ER\")\n\
char __ph[%d] = {0}; // The number of bytes to reserve\n\
#pragma data_seg()\n\n\
typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);\n\
typedef struct EXTRA_STUFF\n\
{\n\
DWORD dwNativeEntryPoint;\n\
} EXTRA_STUFF, *LPEXTRA_STUFF;\n\n\
__declspec(dllexport) BOOL WINAPI _CorDllMainStub(HANDLE hModule, DWORD dwReason, LPVOID pvReserved)\n\
{\n\
|
|
|
|
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
_tprintf(_T("// Unable to retrieve .NET assembly information for file %s\n"), pszAssembly);
return;
}
_tprintf(_T("// This code was automatically generated from assembly\n\
// %s\n\n\
#include <windef.h>\n\n\
#pragma data_seg(push,clrseg,\"%s\")\n\
#pragma comment(linker, \"/SECTION:%s,ER\")\n\
char __ph[%d] = {0}; // The number of bytes to reserve\n\
#pragma data_seg(pop,clrseg)\n\n\
typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);\n\
typedef struct EXTRA_STUFF\n\
{\n\
DWORD dwNativeEntryPoint;\n\
} EXTRA_STUFF, *LPEXTRA_STUFF;\n\n\
__declspec(dllexport) BOOL WINAPI _CorDllMainStub(HANDLE hModule, DWORD dwReason, LPVOID pvReserved)\n\
{\n\
|
︙ | | | ︙ | |
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
}
}
}
return 0;
}
// Merges a pure .NET assembly with a native DLL, inserting it into the specified section
void MergeModules(LPCTSTR pszAssembly, LPCTSTR pszNative, LPCTSTR pszSection)
{
CPEFile peFile;
CPEFile peDest;
HRESULT hr;
DWORD dwMinRVA;
DWORD dwMaxRVA;
DWORD dwDestRVA;
|
|
|
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
}
}
}
return 0;
}
// Merges a pure .NET assembly with a native DLL, inserting it into the specified section
void MergeModules(LPCTSTR pszAssembly, LPCTSTR pszNative, LPCTSTR pszSection, DWORD dwAdjust)
{
CPEFile peFile;
CPEFile peDest;
HRESULT hr;
DWORD dwMinRVA;
DWORD dwMaxRVA;
DWORD dwDestRVA;
|
︙ | | | ︙ | |
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
|
if (pNT->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI && (pCor->Flags & 0x08))
{
PIMAGE_SECTION_HEADER section = IMAGE_FIRST_SECTION(pNT);
for (UINT i=0; i < pNT->FileHeader.NumberOfSections; i++, section++)
{
if (section->SizeOfRawData < section->Misc.VirtualSize)
{
_tprintf(_T("\nWARNING: %s section has a RawData size of %X and a VirtualSize of %X, strong named image may not run on Windows CE\n"), section->Name, section->SizeOfRawData, section->Misc.VirtualSize);
}
}
}
}
if (pCor->Flags & 0x08)
_tprintf(_T("\nWARNING: %s must be re-signed before it can be used!\n"), pszNative);
_tprintf(_T("Success!\n"));
}
|
>
>
>
>
>
>
>
|
>
|
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
|
if (pNT->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI && (pCor->Flags & 0x08))
{
PIMAGE_SECTION_HEADER section = IMAGE_FIRST_SECTION(pNT);
for (UINT i=0; i < pNT->FileHeader.NumberOfSections; i++, section++)
{
if (section->SizeOfRawData < section->Misc.VirtualSize)
{
if (_tcscmp((LPCSTR)section->Name, _T(".data")) == 0 && dwAdjust > 0)
{
_tprintf(_T("\nWARNING: %s section has a RawData size of %d, less than its VirtualSize of %d, adjusting VirtualSize to %d\n"), section->Name, section->SizeOfRawData, section->Misc.VirtualSize, dwAdjust);
section->Misc.VirtualSize = dwAdjust;
}
else
{
_tprintf(_T("\nWARNING: %s section has a RawData size of %d and a VirtualSize of %d, strong named image may not run on Windows CE\n"), section->Name, section->SizeOfRawData, section->Misc.VirtualSize);
}
}
}
}
}
if (pCor->Flags & 0x08)
_tprintf(_T("\nWARNING: %s must be re-signed before it can be used!\n"), pszNative);
_tprintf(_T("Success!\n"));
}
|
︙ | | | ︙ | |
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2C7EDFF06B61482393D94E3A63D90113"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:test, Version=1.0.0.35203, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_2C7EDFF06B61482393D94E3A63D90113"
{
"Name" = "8:test.exe"
"Attributes" = "3:512"
}
|
|
|
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2C7EDFF06B61482393D94E3A63D90113"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:test, Version=1.0.0.14669, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_2C7EDFF06B61482393D94E3A63D90113"
{
"Name" = "8:test.exe"
"Attributes" = "3:512"
}
|
︙ | | | ︙ | |
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_40DFF08BA903482D807E715A041CA8B1"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:install, Version=1.0.0.36491, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_40DFF08BA903482D807E715A041CA8B1"
{
"Name" = "8:install.exe"
"Attributes" = "3:512"
}
|
|
|
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_40DFF08BA903482D807E715A041CA8B1"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:install, Version=1.0.0.14767, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_40DFF08BA903482D807E715A041CA8B1"
{
"Name" = "8:install.exe"
"Attributes" = "3:512"
}
|
︙ | | | ︙ | |
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_40F352185F3B41A485F42BFC64BF9162"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:testce, Version=1.0.0.36383, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_40F352185F3B41A485F42BFC64BF9162"
{
"Name" = "8:testce.exe"
"Attributes" = "3:512"
}
|
|
|
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_40F352185F3B41A485F42BFC64BF9162"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:testce, Version=1.0.0.14603, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_40F352185F3B41A485F42BFC64BF9162"
{
"Name" = "8:testce.exe"
"Attributes" = "3:512"
}
|
︙ | | | ︙ | |
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_A18DBDB7776215EAD9A52C96F8CA1E91"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.46.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84, processorArchitecture=x86"
"ScatterAssemblies"
{
"_A18DBDB7776215EAD9A52C96F8CA1E91"
{
"Name" = "8:System.Data.SQLite.DLL"
"Attributes" = "3:512"
}
|
|
|
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
|
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_A18DBDB7776215EAD9A52C96F8CA1E91"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84, processorArchitecture=x86"
"ScatterAssemblies"
{
"_A18DBDB7776215EAD9A52C96F8CA1E91"
{
"Name" = "8:System.Data.SQLite.DLL"
"Attributes" = "3:512"
}
|
︙ | | | ︙ | |
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
|
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F320FBAE871DA320178BEEA242900CC7"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.46.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86"
"ScatterAssemblies"
{
"_F320FBAE871DA320178BEEA242900CC7"
{
"Name" = "8:System.Data.SQLite.DLL"
"Attributes" = "3:512"
}
|
|
|
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
|
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F320FBAE871DA320178BEEA242900CC7"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86"
"ScatterAssemblies"
{
"_F320FBAE871DA320178BEEA242900CC7"
{
"Name" = "8:System.Data.SQLite.DLL"
"Attributes" = "3:512"
}
|
︙ | | | ︙ | |
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
|
{
"LangId" = "3:1033"
}
"Product"
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SQLite ADO.NET 2.0 Provider"
"ProductCode" = "8:{94A4B462-C696-4CBC-ADAF-805BA6D5638A}"
"PackageCode" = "8:{9FF262B9-1455-4B97-B219-A0052B20CD0F}"
"UpgradeCode" = "8:{78329A82-AFB1-453B-AF00-D46AC911DA89}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.046.0"
"Manufacturer" = "8:Phoenix Software Solutions, LLC"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://sqlite.phxsoftware.com"
"Title" = "8:SQLite ADO.NET 2.0 Provider"
"Subject" = "8:"
"ARPCONTACT" = "8:Phoenix Software Solutions, LLC"
"Keywords" = "8:"
|
|
|
|
|
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
|
{
"LangId" = "3:1033"
}
"Product"
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SQLite ADO.NET 2.0 Provider"
"ProductCode" = "8:{69A1A99B-CB19-42C0-B286-FC0FA687E977}"
"PackageCode" = "8:{E2C4DC3D-26AD-4A49-B8DF-D2A3AB696D35}"
"UpgradeCode" = "8:{78329A82-AFB1-453B-AF00-D46AC911DA89}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.047.0"
"Manufacturer" = "8:Phoenix Software Solutions, LLC"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://sqlite.phxsoftware.com"
"Title" = "8:SQLite ADO.NET 2.0 Provider"
"Subject" = "8:"
"ARPCONTACT" = "8:Phoenix Software Solutions, LLC"
"Keywords" = "8:"
|
︙ | | | ︙ | |