System.Data.SQLite
Check-in [7518ccfcff]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:1.0.47.0
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: 7518ccfcff880210e3e827f262a474f344a98f6a
User & Date: rmsimpson 2007-12-04 16:07:21
Context
2007-12-04
16:11
SQLite 3.5.3 check-in: ba03747b49 user: rmsimpson tags: sourceforge
16:07
1.0.47.0 check-in: 7518ccfcff user: rmsimpson tags: sourceforge
2007-10-01
03:25
1.0.46.0 check-in: 67f18e8aaa user: rmsimpson tags: sourceforge
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to Doc/Extra/dbfactorysupport.html.

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<configuration>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite"/>
      <add name="SQLite Data Provider" invariant="System.Data.SQLite" 
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
                 Version=1.0.46.0, Culture=neutral,
                 PublicKeyToken=db937bc2d44ff139"/>
    </DbProviderFactories>
  </system.data>
</configuration>
</pre>
      </div>
      <p>







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
&lt;configuration&gt;
  &lt;system.data&gt;
    &lt;DbProviderFactories&gt;
      &lt;remove invariant="System.Data.SQLite"/&gt;
      &lt;add name="SQLite Data Provider" invariant="System.Data.SQLite" 
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
                 Version=1.0.47.0, Culture=neutral,
                 PublicKeyToken=db937bc2d44ff139"/&gt;
    &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
&lt;/configuration&gt;
</pre>
      </div>
      <p>

Changes to Doc/Extra/version.html.

51
52
53
54
55
56
57


























58
59
60
61
62
63
64
          </td>
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>


























    <p><b>1.0.46.0 - September 30, 2007</b></p>
    <ul>
    <li>Fixed faulty logic in type discovery code when using SQLiteDataReader.GetValue().</li>
      <li>Fixed Connection.Open() bug when dealing with :memory: databases.</li>
      <li>Fixed SQLiteCommand.ExecuteScalar() to return a properly-typed value.</li>
      <li>Added support for SQLiteParameter.ResetDbType().</li>
      <li>Added test cases for rigid and flexible type testing.</li>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
80
81
82
83
84
85
86
87
88
89
90
          </td>
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.47.0 - December 4, 2007</b></p>
    <ul>
      <li>Code merge with SQLite 3.5.3</li>
      <li>Added installer support for Visual Studio 2008.&nbsp; Code is still using the
        VS2005 SDK so one or two bells and whistles are missing, but nothing significant.</li>
      <li>This is the last version that the FTS1 and FTS2 extensions will appear.&nbsp;
        Everyone should rebuild their fulltext indexes using the new FTS3 module.&nbsp;
        FTS1 and FTS2 suffer from a design flaw that could cause database corruption with
        certain vacuum operations.</li>
      <li>Fixed pooled connections so they rollback any outstanding transactions before
        going to the pool.&nbsp; </li>
      <li>Fixed the unintended breaking of the TYPES keyword, and mis-typing of untyped
        or indeterminate column types. </li>
      <li>Assert a FileIOPermission() requirement in the static SQLiteFunction constructor.
      </li>
      <li>The CE-only SQLiteFunction.RegisterFunction() is now available on the desktop
        platform for dynamic registration of functions.&nbsp; You must still close and re-open
        a connection in order for the new function to be seen by a connection.</li>
      <li>Fixed the "database is locked" errors by implementing behavioral changes in the
        interop.c file for SQLite.&nbsp; Closing a database force-finalizes any prepared
        statements on the database to ensure the connection is fully closed.&nbsp; This
        was rather tricky because the GC thread could still be finalizing statements itself.
        &nbsp;</li>
      <li>Modifed the mergebin utility to help circumvent a long-standing strong name verification
        bug in the Compact Framework.</li>
    </ul>
    <p><b>1.0.46.0 - September 30, 2007</b></p>
    <ul>
    <li>Fixed faulty logic in type discovery code when using SQLiteDataReader.GetValue().</li>
      <li>Fixed Connection.Open() bug when dealing with :memory: databases.</li>
      <li>Fixed SQLiteCommand.ExecuteScalar() to return a properly-typed value.</li>
      <li>Added support for SQLiteParameter.ResetDbType().</li>
      <li>Added test cases for rigid and flexible type testing.</li>

Changes to Doc/Extra/welcome.html.

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
          engine (compared to other providers and engines)</a></p>
      <br>
      <h1 class="heading">SQLite.NET Provider Features</h1>
      <p>This SQLite provider implements every feature of the underlying SQLite 
        database engine without omission. Here's a brief summary:</p>
      <UL>
        <LI>
        Written from scratch on VS2005 specifically for ADO.NET 2.0, implenting all the
        base classes and features recently introduced in the framework, including automatic
        transaction enlistment.<li>Supports the Full and Compact .NET Framework, as well as
          native C/C++ development.&nbsp; 100% binary compatible with the original sqlite3.dll.
        </li>
        <li>
        On the Compact Framework, it is faster than the newly-introduced Sql Server Mobile.
          SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime,
          runs queries faster, and has a smaller database file size as well. </li>
        <li>Encrypted database support.&nbsp; Encrypted databases are fully encrypted and
          support both binary and cleartext password types. </li>
        <li>Visual Studio 2005 Design-Time Support.&nbsp; You can add a SQLite 
        database to the Servers list, design queries with the Query Designer, 
        drag-and-drop tables onto a Typed DataSet, etc. </li>
        <li>
        Single file redistributable.&nbsp; The core sqlite3 codebase and the ADO.NET wrapper 
        are combined into one multi-module assembly. </li>
        <li>Binaries included for Itanium, x64, x86 and ARM processors. </li>
        <li>







|










|







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
          engine (compared to other providers and engines)</a></p>
      <br>
      <h1 class="heading">SQLite.NET Provider Features</h1>
      <p>This SQLite provider implements every feature of the underlying SQLite 
        database engine without omission. Here's a brief summary:</p>
      <UL>
        <LI>
        Written from scratch on VS2005/2008 specifically for ADO.NET 2.0, implenting all the
        base classes and features recently introduced in the framework, including automatic
        transaction enlistment.<li>Supports the Full and Compact .NET Framework, as well as
          native C/C++ development.&nbsp; 100% binary compatible with the original sqlite3.dll.
        </li>
        <li>
        On the Compact Framework, it is faster than the newly-introduced Sql Server Mobile.
          SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime,
          runs queries faster, and has a smaller database file size as well. </li>
        <li>Encrypted database support.&nbsp; Encrypted databases are fully encrypted and
          support both binary and cleartext password types. </li>
        <li>Visual Studio 2005/2008 Design-Time Support.&nbsp; You can add a SQLite 
        database to the Servers list, design queries with the Query Designer, 
        drag-and-drop tables onto a Typed DataSet, etc. </li>
        <li>
        Single file redistributable.&nbsp; The core sqlite3 codebase and the ADO.NET wrapper 
        are combined into one multi-module assembly. </li>
        <li>Binaries included for Itanium, x64, x86 and ARM processors. </li>
        <li>

Changes to Doc/SQLite.NET.chm.

cannot compute difference between binary files

Changes to SQLite.Interop/SQLite.Interop.rc.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,46,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "System.Data.SQLite Interop Library"
            VALUE "FileVersion", "1.0.46.0"
            VALUE "InternalName", "SQLite.Interop.DLL"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "SQLite3.DLL 3.4.2"
            VALUE "ProductName", "System.Data.SQLite"
            VALUE "ProductVersion", "1.0"
        END
    END







|







 







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,47,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "System.Data.SQLite Interop Library"
            VALUE "FileVersion", "1.0.47.0"
            VALUE "InternalName", "SQLite.Interop.DLL"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "SQLite3.DLL 3.4.2"
            VALUE "ProductName", "System.Data.SQLite"
            VALUE "ProductVersion", "1.0"
        END
    END

Changes to SQLite.Interop/SQLite.Interop.vcproj.

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
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
...
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
...
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
...
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
...
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
...
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
...
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
...
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
...
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
...
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
...
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
				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 &quot;fts1/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/System.Data.SQLite.DLL"
				GenerateManifest="false"
				IgnoreDefaultLibraryNames=""
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				OptimizeForWindows98="1"
................................................................................
			/>
			<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"
			/>
................................................................................
				AdditionalIncludeDirectories="$(IntDir)"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				IgnoreImportLibrary="true"
				AdditionalDependencies="&quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot;"
				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="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Merging binaries ..."
				CommandLine="..\bin\tools\mergebin.exe /S:.clr ..\System.Data.SQLite\bin\CompactFramework\$(TargetFileName) &quot;$(TargetPath)&quot;&#x0D;&#x0A;sn -Ra &quot;$(TargetPath)&quot; ..\System.Data.SQLite\System.Data.SQLite.CF.snk&#x0D;&#x0A;"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory="\Program Files\testce"
				RegisterOutput="0"
				AdditionalFiles=""
			/>
................................................................................
				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="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="advapi32.lib &quot;fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/Itanium/System.Data.SQLite.DLL"
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				OptimizeForWindows98="1"
				ImportLibrary=""
				TargetMachine="5"
................................................................................
				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="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="advapi32.lib &quot;fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/x64/System.Data.SQLite.DLL"
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				OptimizeForWindows98="1"
				ImportLibrary=""
				TargetMachine="17"
................................................................................
			<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"
			/>
................................................................................
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="advapi32.lib &quot;fts1/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/$(InputName).DLL"
				LinkIncremental="1"
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				GenerateDebugInformation="true"
				ImportLibrary=""
................................................................................
				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"
................................................................................
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				IgnoreImportLibrary="true"
				AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
				AdditionalDependencies="&quot;fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot;"
				OutputFile="../bin/CompactFramework/$(InputName).DLL"
				AdditionalLibraryDirectories=""
				IgnoreDefaultLibraryNames=""
				ModuleDefinitionFile="src\sqlite3.def"
				AddModuleNamesToAssembly=""
				EmbedManagedResourceFile=""
				GenerateDebugInformation="true"
................................................................................
				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"
			/>
................................................................................
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="advapi32.lib &quot;fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/Itanium/$(InputName).DLL"
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				GenerateDebugInformation="true"
				ImportLibrary=""
				TargetMachine="5"
................................................................................
				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"
			/>
................................................................................
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="advapi32.lib &quot;fts1/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS1.lib&quot; &quot;fts2/$(PlatformName)/$(ConfigurationName)/SQLite.Interop.FTS2.lib&quot; $(NOINHERIT)"
				OutputFile="../bin/x64/$(InputName).DLL"
				ModuleDefinitionFile="src\sqlite3.def"
				EmbedManagedResourceFile=""
				DelayLoadDLLs="advapi32.dll"
				GenerateDebugInformation="true"
				ImportLibrary=""
				TargetMachine="17"







|







 







<







 







|







 







<
<







<







 







|







 







|







 







<







 







|







 







<







 







|







 







<







 







|







 







<







 







|







 







<







 







|







 







<







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
...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
150
151
152
153
154
155
156


157
158
159
160
161
162
163

164
165
166
167
168
169
170
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
...
234
235
236
237
238
239
240

241
242
243
244
245
246
247
...
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
...
320
321
322
323
324
325
326

327
328
329
330
331
332
333
...
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
...
402
403
404
405
406
407
408

409
410
411
412
413
414
415
...
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
...
488
489
490
491
492
493
494

495
496
497
498
499
500
501
...
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
...
568
569
570
571
572
573
574

575
576
577
578
579
580
581
...
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
...
649
650
651
652
653
654
655

656
657
658
659
660
661
662
				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"
................................................................................
			/>
			<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"
			/>
................................................................................
				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="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Merging binaries ..."
				CommandLine="..\bin\tools\mergebin.exe /A:1120 /S:.clr ..\System.Data.SQLite\bin\CompactFramework\$(TargetFileName) &quot;$(TargetPath)&quot;&#x0D;&#x0A;sn -Ra &quot;$(TargetPath)&quot; ..\System.Data.SQLite\System.Data.SQLite.CF.snk&#x0D;&#x0A;"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory="\Program Files\testce"
				RegisterOutput="0"
				AdditionalFiles=""
			/>
................................................................................
				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="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"
................................................................................
				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="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"
................................................................................
			<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"
			/>
................................................................................
				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=""
................................................................................
				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"
................................................................................
			<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"
................................................................................
				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"
			/>
................................................................................
				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"
................................................................................
				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"
			/>
................................................................................
				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"

Changes to SQLite.Interop/crypt.c.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
..
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
// space to hold it.
static LPCRYPTBLOCK CreateCryptBlock(HCRYPTKEY hKey, Pager *pager, LPCRYPTBLOCK pExisting)
{
  LPCRYPTBLOCK pBlock;

  if (!pExisting) // Creating a new cryptblock
  {
    pBlock = sqliteMalloc(sizeof(CRYPTBLOCK));
    ZeroMemory(pBlock, sizeof(CRYPTBLOCK));
    pBlock->hReadKey = hKey;
    pBlock->hWriteKey = hKey;
  }
  else // Updating an existing cryptblock
  {
    pBlock = pExisting;
................................................................................

  pBlock->dwPageSize = (DWORD)pager->pageSize;
  pBlock->dwCryptSize = pBlock->dwPageSize;

  // Existing cryptblocks may have a buffer, if so, delete it
  if (pBlock->pvCrypt)
  {
    sqliteFree(pBlock->pvCrypt);
    pBlock->pvCrypt = NULL;
  }

  // Figure out how big to make our spare crypt block
  CryptEncrypt(hKey, 0, TRUE, 0, NULL, &pBlock->dwCryptSize, pBlock->dwCryptSize * 2);
  pBlock->pvCrypt = sqliteMalloc(pBlock->dwCryptSize + (CRYPT_OFFSET * 2));

  return pBlock;
}

// Destroy a cryptographic context and any buffers and keys allocated therein
static void DestroyCryptBlock(LPCRYPTBLOCK pBlock)
{
................................................................................
  {
    CryptDestroyKey(pBlock->hWriteKey);
  }

  // If there's extra buffer space allocated, free it as well
  if (pBlock->pvCrypt)
  {
    sqliteFree(pBlock->pvCrypt);
  }

  // All done with this cryptblock
  sqliteFree(pBlock);
}

// Encrypt/Decrypt functionality, called by pager.c
void * sqlite3Codec(void *pArg, void *data, Pgno nPageNum, int nMode)
{
  LPCRYPTBLOCK pBlock = (LPCRYPTBLOCK)pArg;
  DWORD dwPageSize;
  LPVOID pvTemp;

  if (!pBlock) return data;

  // Make sure the page size for the pager is still the same as the page size
  // for the cryptblock.  If the user changed it, we need to adjust!
  if (nMode != 2)
  {

    PgHdr *pageHeader;
    pageHeader = DATA_TO_PGHDR(data);
    if (pageHeader->pPager->pageSize != pBlock->dwPageSize)
    {

      // Update the cryptblock to reflect the new page size
      CreateCryptBlock(0, pageHeader->pPager, pBlock);
    }
  }



  switch(nMode)
  {
  case 0: // Undo a "case 7" journal file encryption
  case 2: // Reload a page
  case 3: // Load a page
    if (!pBlock->hReadKey) break;







|







 







|





|







 







|



|













|
<
>
|
|
|
<
>
|
|
<
<
>
>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
..
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
// space to hold it.
static LPCRYPTBLOCK CreateCryptBlock(HCRYPTKEY hKey, Pager *pager, LPCRYPTBLOCK pExisting)
{
  LPCRYPTBLOCK pBlock;

  if (!pExisting) // Creating a new cryptblock
  {
    pBlock = sqlite3_malloc(sizeof(CRYPTBLOCK));
    ZeroMemory(pBlock, sizeof(CRYPTBLOCK));
    pBlock->hReadKey = hKey;
    pBlock->hWriteKey = hKey;
  }
  else // Updating an existing cryptblock
  {
    pBlock = pExisting;
................................................................................

  pBlock->dwPageSize = (DWORD)pager->pageSize;
  pBlock->dwCryptSize = pBlock->dwPageSize;

  // Existing cryptblocks may have a buffer, if so, delete it
  if (pBlock->pvCrypt)
  {
    sqlite3_free(pBlock->pvCrypt);
    pBlock->pvCrypt = NULL;
  }

  // Figure out how big to make our spare crypt block
  CryptEncrypt(hKey, 0, TRUE, 0, NULL, &pBlock->dwCryptSize, pBlock->dwCryptSize * 2);
  pBlock->pvCrypt = sqlite3_malloc(pBlock->dwCryptSize + (CRYPT_OFFSET * 2));

  return pBlock;
}

// Destroy a cryptographic context and any buffers and keys allocated therein
static void DestroyCryptBlock(LPCRYPTBLOCK pBlock)
{
................................................................................
  {
    CryptDestroyKey(pBlock->hWriteKey);
  }

  // If there's extra buffer space allocated, free it as well
  if (pBlock->pvCrypt)
  {
    sqlite3_free(pBlock->pvCrypt);
  }

  // All done with this cryptblock
  sqlite3_free(pBlock);
}

// Encrypt/Decrypt functionality, called by pager.c
void * sqlite3Codec(void *pArg, void *data, Pgno nPageNum, int nMode)
{
  LPCRYPTBLOCK pBlock = (LPCRYPTBLOCK)pArg;
  DWORD dwPageSize;
  LPVOID pvTemp;

  if (!pBlock) return data;

  // Make sure the page size for the pager is still the same as the page size
  // for the cryptblock.  If the user changed it, we need to adjust!
  //if (nMode != 2)

  //{
  //  PgHdr *pageHeader;
  //  pageHeader = DATA_TO_PGHDR(data);
  //  if (pageHeader->pPager->pageSize != pBlock->dwPageSize)

  //  {
  //    // Update the cryptblock to reflect the new page size
  //    CreateCryptBlock(0, pageHeader->pPager, pBlock);


  //  }
  //}

  switch(nMode)
  {
  case 0: // Undo a "case 7" journal file encryption
  case 2: // Reload a page
  case 3: // Load a page
    if (!pBlock->hReadKey) break;

Changes to SQLite.Interop/interop.c.


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
..
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
...
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
...
482
483
484
485
486
487
488





489
490
491
492
493
494
495
...
857
858
859
860
861
862
863








864

#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);
................................................................................
__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;
................................................................................
}

__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)
................................................................................
__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)
................................................................................
    break;
  }
  LeaveDbMutex(db);

  return ret;
}









#endif // OS_WIN
>








<
<
<
<
<
<







<
<







 







|
|




|
<
>
|
<
>




|
<
>
|
<
>




|
|
|

|
|
<
>
|
<
>
|
|
|
<
<
>
>
|
|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>


<
<

>
|

|

<
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
|
>
>
>
>
>
>
>







 







>
>
>
>
>







 







>
>
>
>
>
>
>
>

1
2
3
4
5
6
7
8
9






10
11
12
13
14
15
16


17
18
19
20
21
22
23
..
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
...
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
...
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
...
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
//#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);
................................................................................
__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;
................................................................................
}

__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)
................................................................................
__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)
................................................................................
    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

Changes to SQLite.Interop/merge.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This code was automatically generated from assembly
// C:\Src\SQLite.NET\System.Data.SQLite\bin\CompactFramework\System.Data.SQLite.dll

#include <windef.h>

#pragma data_seg(".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
  char __ph[131688] = {0}; // The number of bytes to reserve
#pragma data_seg()

typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
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
// This code was automatically generated from assembly
// C:\Src\SQLite.NET\System.Data.SQLite\bin\CompactFramework\System.Data.SQLite.dll

#include <windef.h>

#pragma data_seg(push,clrseg,".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
  char __ph[131636] = {0}; // The number of bytes to reserve
#pragma data_seg(pop,clrseg)

typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
typedef struct EXTRA_STUFF
{
  DWORD dwNativeEntryPoint;
} EXTRA_STUFF, *LPEXTRA_STUFF;

Changes to SQLite.Interop/merge_full.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This code was automatically generated from assembly
// C:\Src\SQLite.NET\System.Data.SQLite\bin\System.Data.SQLite.dll

#include <windef.h>

#pragma data_seg(".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
  char __ph[141848] = {0}; // The number of bytes to reserve
#pragma data_seg()

typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
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
// This code was automatically generated from assembly
// C:\Src\SQLite.NET\System.Data.SQLite\bin\System.Data.SQLite.dll

#include <windef.h>

#pragma data_seg(push,clrseg,".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
  char __ph[142252] = {0}; // The number of bytes to reserve
#pragma data_seg(pop,clrseg)

typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
typedef struct EXTRA_STUFF
{
  DWORD dwNativeEntryPoint;
} EXTRA_STUFF, *LPEXTRA_STUFF;

Changes to SQLite.NET.sln.

24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
..
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
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

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
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
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop", "SQLite.Interop\SQLite.Interop.vcproj", "{10B51CE8-A838-44DE-BD82-B658F0296F80}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
	ProjectSection(ProjectDependencies) = postProject
		{BCD4CA74-771B-49EE-9025-606CB839DA0B} = {BCD4CA74-771B-49EE-9025-606CB839DA0B}
		{AC139951-261A-4463-B6FA-AEBC25283A66} = {AC139951-261A-4463-B6FA-AEBC25283A66}
		{AC139952-261A-4463-B6FA-AEBC25283A66} = {AC139952-261A-4463-B6FA-AEBC25283A66}

		{BCD6CA74-771B-49EE-9025-606CB839DA0B} = {BCD6CA74-771B-49EE-9025-606CB839DA0B}
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testce", "testce\testce.csproj", "{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
................................................................................
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Compact Framework = Debug|Compact Framework
		Debug|Itanium = Debug|Itanium
		Debug|Mixed Platforms = Debug|Mixed Platforms

		Debug|Win32 = Debug|Win32
		Debug|x64 = Debug|x64
		Release|Compact Framework = Release|Compact Framework
		Release|Itanium = Release|Itanium
		Release|Mixed Platforms = Release|Mixed Platforms

		Release|Win32 = Release|Win32
		Release|x64 = Release|x64
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.Build.0 = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU

		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|x64.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.Build.0 = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU

		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Win32.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|x64.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Itanium.Build.0 = Debug|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU

		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Win32.ActiveCfg = Debug|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Win32.Build.0 = Debug|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|x64.ActiveCfg = Debug|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|x64.Build.0 = Debug|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Itanium.ActiveCfg = Release|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Itanium.Build.0 = Release|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Mixed Platforms.Build.0 = Release|Any CPU

		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.ActiveCfg = Release|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.Build.0 = Release|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|x64.ActiveCfg = Release|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|x64.Build.0 = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.Build.0 = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.Deploy.0 = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Mixed Platforms.Build.0 = Debug|x64



		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.ActiveCfg = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.Build.0 = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.Deploy.0 = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.ActiveCfg = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.Build.0 = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.Deploy.0 = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Deploy.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Itanium.ActiveCfg = Release|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Itanium.Build.0 = Release|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Mixed Platforms.ActiveCfg = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Mixed Platforms.Build.0 = Release|x64



		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.ActiveCfg = Release|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.Build.0 = Release|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|x64.ActiveCfg = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|x64.Build.0 = Release|x64
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.Build.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.Deploy.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU

		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|x64.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.Build.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.Deploy.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Itanium.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU

		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Win32.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|x64.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU

		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|x64.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|x64.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.Build.0 = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Build.0 = Release|Any CPU

		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Win32.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Win32.Build.0 = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|x64.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|x64.Build.0 = Release|Any CPU
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.Build.0 = Debug|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.Build.0 = Debug|Win32



		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.ActiveCfg = Debug|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.Build.0 = Debug|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.ActiveCfg = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.Build.0 = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.ActiveCfg = Release|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.Build.0 = Release|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.Build.0 = Release|Win32



		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.ActiveCfg = Release|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.Build.0 = Release|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.ActiveCfg = Release|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.Build.0 = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.Build.0 = Debug|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.Build.0 = Debug|x64



		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.ActiveCfg = Debug|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.Build.0 = Debug|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.ActiveCfg = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.Build.0 = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.ActiveCfg = Release|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.Build.0 = Release|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.ActiveCfg = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.Build.0 = Release|x64



		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.ActiveCfg = Release|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.Build.0 = Release|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.ActiveCfg = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.Build.0 = Release|x64
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal







<


>







 







>





>










>








>







>









>












>
>
>













>
>
>











>









>







>









>








|
|
>
>
>








|
|
>
>
>










>
>
>










>
>
>









24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
40
..
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
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
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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop", "SQLite.Interop\SQLite.Interop.vcproj", "{10B51CE8-A838-44DE-BD82-B658F0296F80}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
	EndProjectSection
	ProjectSection(ProjectDependencies) = postProject

		{AC139951-261A-4463-B6FA-AEBC25283A66} = {AC139951-261A-4463-B6FA-AEBC25283A66}
		{AC139952-261A-4463-B6FA-AEBC25283A66} = {AC139952-261A-4463-B6FA-AEBC25283A66}
		{BCD4CA74-771B-49EE-9025-606CB839DA0B} = {BCD4CA74-771B-49EE-9025-606CB839DA0B}
		{BCD6CA74-771B-49EE-9025-606CB839DA0B} = {BCD6CA74-771B-49EE-9025-606CB839DA0B}
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testce", "testce\testce.csproj", "{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}"
	ProjectSection(WebsiteProperties) = preProject
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.Debug = "False"
................................................................................
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Compact Framework = Debug|Compact Framework
		Debug|Itanium = Debug|Itanium
		Debug|Mixed Platforms = Debug|Mixed Platforms
		Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4)
		Debug|Win32 = Debug|Win32
		Debug|x64 = Debug|x64
		Release|Compact Framework = Release|Compact Framework
		Release|Itanium = Release|Itanium
		Release|Mixed Platforms = Release|Mixed Platforms
		Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4)
		Release|Win32 = Release|Win32
		Release|x64 = Release|x64
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.Build.0 = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Debug|x64.ActiveCfg = Debug|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.Build.0 = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|Win32.ActiveCfg = Release|Any CPU
		{AC139951-261A-4463-B6FA-AEBC25283A66}.Release|x64.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Itanium.Build.0 = Debug|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Win32.ActiveCfg = Debug|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|Win32.Build.0 = Debug|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|x64.ActiveCfg = Debug|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Debug|x64.Build.0 = Debug|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Itanium.ActiveCfg = Release|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Itanium.Build.0 = Release|Itanium
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.ActiveCfg = Release|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.Build.0 = Release|x86
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|x64.ActiveCfg = Release|x64
		{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|x64.Build.0 = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.Build.0 = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Itanium.Deploy.0 = Debug|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Mixed Platforms.Build.0 = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.ActiveCfg = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.Build.0 = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.Deploy.0 = Debug|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.ActiveCfg = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.Build.0 = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|x64.Deploy.0 = Debug|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Deploy.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Itanium.ActiveCfg = Release|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Itanium.Build.0 = Release|Itanium
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Mixed Platforms.ActiveCfg = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Mixed Platforms.Build.0 = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4)
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.ActiveCfg = Release|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.Build.0 = Release|Win32
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|x64.ActiveCfg = Release|x64
		{10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|x64.Build.0 = Release|x64
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.Build.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.Deploy.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|x64.ActiveCfg = Debug|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.Build.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Compact Framework.Deploy.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Itanium.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|Win32.ActiveCfg = Release|Any CPU
		{B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Release|x64.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Itanium.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|Win32.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|x64.ActiveCfg = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Debug|x64.Build.0 = Debug|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Compact Framework.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Itanium.Build.0 = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Mixed Platforms.Build.0 = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Win32.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|Win32.Build.0 = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|x64.ActiveCfg = Release|Any CPU
		{AC139952-261A-4463-B6FA-AEBC25283A66}.Release|x64.Build.0 = Release|Any CPU
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.Build.0 = Debug|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.Build.0 = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.ActiveCfg = Debug|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.Build.0 = Debug|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.ActiveCfg = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.Build.0 = Debug|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.ActiveCfg = Release|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.Build.0 = Release|Itanium
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.ActiveCfg = Release|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.Build.0 = Release|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.ActiveCfg = Release|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.Build.0 = Release|Win32
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.ActiveCfg = Release|x64
		{BCD6CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.Build.0 = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Compact Framework.Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.ActiveCfg = Debug|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Itanium.Build.0 = Debug|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Mixed Platforms.Build.0 = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.ActiveCfg = Debug|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|Win32.Build.0 = Debug|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.ActiveCfg = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Debug|x64.Build.0 = Debug|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.ActiveCfg = Release|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Itanium.Build.0 = Release|Itanium
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.ActiveCfg = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Mixed Platforms.Build.0 = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4)
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.ActiveCfg = Release|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|Win32.Build.0 = Release|Win32
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.ActiveCfg = Release|x64
		{BCD4CA74-771B-49EE-9025-606CB839DA0B}.Release|x64.Build.0 = Release|x64
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

Changes to SQLite.NET.suo.

cannot compute difference between binary files

Changes to System.Data.SQLite/AssemblyInfo.cs.

44
45
46
47
48
49
50
51
52
53
54
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.46.0")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.46.0")]
#endif







|

|

44
45
46
47
48
49
50
51
52
53
54
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.47.0")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.47.0")]
#endif

Changes to System.Data.SQLite/SQLite3.cs.

335
336
337
338
339
340
341
342
343
344
345

346
347
348


349
350
351
352
353
354
355
      int len;
      IntPtr p = UnsafeNativeMethods.sqlite3_column_decltype_interop(stmt._sqlite_stmt, index, out len);
      nAffinity = ColumnAffinity(stmt, index);

      if (p != IntPtr.Zero) return UTF8ToString(p, len);
      else
      {
        return String.Empty;
        //string[] ar = stmt.TypeDefinitions;
        //if (ar != null)
        //{

        //  if (index < ar.Length && ar[index] != null)
        //    return ar[index];
        //}



        //switch (nAffinity)
        //{
        //  case TypeAffinity.Int64:
        //    return "BIGINT";
        //  case TypeAffinity.Double:
        //    return "DOUBLE";







<
|
|
<
>
|
|
<
>
>







335
336
337
338
339
340
341

342
343

344
345
346

347
348
349
350
351
352
353
354
355
      int len;
      IntPtr p = UnsafeNativeMethods.sqlite3_column_decltype_interop(stmt._sqlite_stmt, index, out len);
      nAffinity = ColumnAffinity(stmt, index);

      if (p != IntPtr.Zero) return UTF8ToString(p, len);
      else
      {

        string[] ar = stmt.TypeDefinitions;
        if (ar != null)

        {
          if (index < ar.Length && ar[index] != null)
            return ar[index];

        }
        return String.Empty;

        //switch (nAffinity)
        //{
        //  case TypeAffinity.Int64:
        //    return "BIGINT";
        //  case TypeAffinity.Double:
        //    return "DOUBLE";

Changes to System.Data.SQLite/SQLiteCommand.cs.

561
562
563
564
565
566
567
568
569
570

571
572
573
574
575
576
577

      for(;;)
      {
        stmt = GetStatement(x);
        x++;
        if (stmt == null) break;

        _cnn._sql.Step(stmt);
        nAffected += _cnn._sql.Changes;
        _cnn._sql.Reset(stmt);

      }

      return nAffected;
    }

    /// <summary>
    /// Execute the command and return the first column of the first row of the resultset







|
<

>







561
562
563
564
565
566
567
568

569
570
571
572
573
574
575
576
577

      for(;;)
      {
        stmt = GetStatement(x);
        x++;
        if (stmt == null) break;

        while (_cnn._sql.Step(stmt)) ;

        _cnn._sql.Reset(stmt);
        nAffected += _cnn._sql.Changes;
      }

      return nAffected;
    }

    /// <summary>
    /// Execute the command and return the first column of the first row of the resultset

Changes to System.Data.SQLite/SQLiteConnection.cs.

497
498
499
500
501
502
503


504
505


506
507


508
509
510
511
512

513
514
515
516
517
518
519
          cnn._transactionLevel = _transactionLevel;
          cnn._enlistment = _enlistment;
          cnn._connectionState = _connectionState;
          cnn._version = _version;

          cnn._enlistment._transaction._cnn = cnn;
          cnn._enlistment._disposeConnection = true;


        }
        else


        {
          _sql.Close();


        }
        _enlistment = null;
#else
          _sql.Close();
#endif

        _sql = null;
        _transactionLevel = 0;
      }
      OnStateChange(ConnectionState.Closed);
    }

    /// <summary>







>
>

<
>
>

<
>
>
|
<
<

<
>







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
          cnn._transactionLevel = _transactionLevel;
          cnn._enlistment = _enlistment;
          cnn._connectionState = _connectionState;
          cnn._version = _version;

          cnn._enlistment._transaction._cnn = cnn;
          cnn._enlistment._disposeConnection = true;
          _sql = null;
          _enlistment = null;
        }

#endif
        if (_sql != null)
        {

          if (_transactionLevel > 0)
            SQLiteTransaction.IssueRollback(this);



          _sql.Close();

        }
        _sql = null;
        _transactionLevel = 0;
      }
      OnStateChange(ConnectionState.Closed);
    }

    /// <summary>

Changes to System.Data.SQLite/SQLiteConvert.cs.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
    /// <summary>
    /// Converts a SQLiteType to a .NET Type object
    /// </summary>
    /// <param name="t">The SQLiteType to convert</param>
    /// <returns>Returns a .NET Type object</returns>
    internal static Type SQLiteTypeToType(SQLiteType t)
    {
      if (t.Type != DbType.Object)
        return SQLiteConvert.DbTypeToType(t.Type);

      return _typeaffinities[(int)t.Affinity];
    }

    static Type[] _typeaffinities = {
      null,
      typeof(Int64),
      typeof(Double),
      typeof(string),
      typeof(byte[]),
      typeof(DBNull),
      null,
      null,
      null,
      null,
      typeof(DateTime),
      null,
    };

    /// <summary>
    /// For a given intrinsic type, return a DbType
    /// </summary>
    /// <param name="typ">The native type to convert</param>
    /// <returns>The corresponding (closest match) DbType</returns>
    internal static DbType TypeToDbType(Type typ)
    {







<
|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







351
352
353
354
355
356
357

358
359

360
















361
362
363
364
365
366
367
    /// <summary>
    /// Converts a SQLiteType to a .NET Type object
    /// </summary>
    /// <param name="t">The SQLiteType to convert</param>
    /// <returns>Returns a .NET Type object</returns>
    internal static Type SQLiteTypeToType(SQLiteType t)
    {

      return SQLiteConvert.DbTypeToType(t.Type);
    }


















    /// <summary>
    /// For a given intrinsic type, return a DbType
    /// </summary>
    /// <param name="typ">The native type to convert</param>
    /// <returns>The corresponding (closest match) DbType</returns>
    internal static DbType TypeToDbType(Type typ)
    {

Changes to System.Data.SQLite/SQLiteFunction.cs.

403
404
405
406
407
408
409

410
411
412
413
414
415
416
...
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
...
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
    }

#if !PLATFORM_COMPACTFRAMEWORK
    /// <summary>
    /// Using reflection, enumerate all assemblies in the current appdomain looking for classes that
    /// have a SQLiteFunctionAttribute attribute, and registering them accordingly.
    /// </summary>

    static SQLiteFunction()
    {
      SQLiteFunctionAttribute at;
      System.Reflection.Assembly[] arAssemblies = System.AppDomain.CurrentDomain.GetAssemblies();
      int w = arAssemblies.Length;
      System.Reflection.AssemblyName sqlite = System.Reflection.Assembly.GetCallingAssembly().GetName();

................................................................................
              at._instanceType = arTypes[x];
              _registeredFunctions.Add(at);
            }
          }
        }
      }
    }
#else
    /// <summary>
    /// Manual method of registering a function.  The type must still have the SQLiteFunctionAttributes in order to work
    /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
    /// </summary>
    /// <param name="typ">The type of the function to register</param>
    public static void RegisterFunction(Type typ)
    {
................................................................................
        if (at != null)
        {
          at._instanceType = typ;
          _registeredFunctions.Add(at);
        }
      }
    }
#endif

    /// <summary>
    /// Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection.
    /// It is done this way so that all user-defined functions will access the database using the same encoding scheme
    /// as the connection (UTF-8 or UTF-16).
    /// </summary>
    /// <remarks>







>







 







|







 







<







403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
...
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
...
481
482
483
484
485
486
487

488
489
490
491
492
493
494
    }

#if !PLATFORM_COMPACTFRAMEWORK
    /// <summary>
    /// Using reflection, enumerate all assemblies in the current appdomain looking for classes that
    /// have a SQLiteFunctionAttribute attribute, and registering them accordingly.
    /// </summary>
    [Security.Permissions.FileIOPermission(Security.Permissions.SecurityAction.Assert, AllFiles = Security.Permissions.FileIOPermissionAccess.PathDiscovery)]
    static SQLiteFunction()
    {
      SQLiteFunctionAttribute at;
      System.Reflection.Assembly[] arAssemblies = System.AppDomain.CurrentDomain.GetAssemblies();
      int w = arAssemblies.Length;
      System.Reflection.AssemblyName sqlite = System.Reflection.Assembly.GetCallingAssembly().GetName();

................................................................................
              at._instanceType = arTypes[x];
              _registeredFunctions.Add(at);
            }
          }
        }
      }
    }
#endif
    /// <summary>
    /// Manual method of registering a function.  The type must still have the SQLiteFunctionAttributes in order to work
    /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
    /// </summary>
    /// <param name="typ">The type of the function to register</param>
    public static void RegisterFunction(Type typ)
    {
................................................................................
        if (at != null)
        {
          at._instanceType = typ;
          _registeredFunctions.Add(at);
        }
      }
    }


    /// <summary>
    /// Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection.
    /// It is done this way so that all user-defined functions will access the database using the same encoding scheme
    /// as the connection (UTF-8 or UTF-16).
    /// </summary>
    /// <remarks>

Changes to System.Data.SQLite/SQLiteTransaction.cs.

116
117
118
119
120
121
122








123
124
125
126
127
128
129
130
131
132
133
134
135
136
    /// <summary>
    /// Rolls back the active transaction.
    /// </summary>
    public override void Rollback()
    {
      IsValid(true);









      using (SQLiteCommand cmd = _cnn.CreateCommand())
      {
        cmd.CommandText = "ROLLBACK";
        cmd.ExecuteNonQuery();
      }
      _cnn._transactionLevel = 0;
      _cnn = null;
    }

    internal bool IsValid(bool throwError)
    {
      if (_cnn == null)
      {
        if (throwError == true) throw new ArgumentNullException("No connection associated with this transaction");







>
>
>
>
>
>
>
>
|




<
<







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
    /// <summary>
    /// Rolls back the active transaction.
    /// </summary>
    public override void Rollback()
    {
      IsValid(true);

      IssueRollback(_cnn);

      _cnn._transactionLevel = 0;
      _cnn = null;
    }

    internal static void IssueRollback(SQLiteConnection cnn)
    {
      using (SQLiteCommand cmd = cnn.CreateCommand())
      {
        cmd.CommandText = "ROLLBACK";
        cmd.ExecuteNonQuery();
      }


    }

    internal bool IsValid(bool throwError)
    {
      if (_cnn == null)
      {
        if (throwError == true) throw new ArgumentNullException("No connection associated with this transaction");

Changes to bin/CompactFramework/System.Data.SQLite.DLL.

cannot compute difference between binary files

Changes to bin/CompactFramework/System.Data.SQLite.lib.

cannot compute difference between binary files

Changes to bin/CompactFramework/testce.exe.

cannot compute difference between binary files

Changes to bin/Designer/SQLite.Designer.dll.

cannot compute difference between binary files

Changes to bin/Designer/install.exe.

cannot compute difference between binary files

Changes to bin/System.Data.SQLite.dll.

cannot compute difference between binary files

Changes to bin/System.Data.SQLite.lib.

cannot compute difference between binary files

Changes to bin/itanium/System.Data.SQLite.DLL.

cannot compute difference between binary files

Changes to bin/itanium/System.Data.SQLite.lib.

cannot compute difference between binary files

Changes to bin/test.exe.

cannot compute difference between binary files

Changes to bin/tools/mergebin.exe.

cannot compute difference between binary files

Changes to bin/x64/System.Data.SQLite.DLL.

cannot compute difference between binary files

Changes to bin/x64/System.Data.SQLite.lib.

cannot compute difference between binary files

Changes to readme.htm.

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
31
32
33
34
35

36
37
38
39
40
41
42
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
...
115
116
117
118
119
120
121


























122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
  </head>
  <body>
    ADO.NET 2.0 SQLite Data Provider<br>
    Version 1.0.46.0 September 30, 2007<br>
    Using SQLite 3.4.2<br>
    Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br>
    Released to the public domain, use at your own risk!<br>
    Official provider website:&nbsp; <a href="http://sqlite.phxsoftware.com">http://sqlite.phxsoftware.com</a><br />
    <br>
    The latest version can be downloaded <a href="http://sourceforge.net/projects/sqlite-dotnet2">
      here</a>
    <br>
................................................................................
    <br>
    <b></b>
    <h2>
      <b>Features:</b><br>
    </h2>
    <UL>
      <LI>
      Written from scratch on VS2005 specifically for ADO.NET 2.0, implementing all the
      base classes and features recently introduced in the framework, including automatic
      transaction enlistment.<li>Supports the Full
        and Compact .NET Framework, as well as native C/C++ development.&nbsp; 100% binary
        compatible with the original sqlite3.dll.</li>
      <LI>
      On the Compact Framework, it is faster than the newly-introduced Sql Server 
      Mobile.  SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, runs queries faster, and has a smaller database file size as well.
      <li>Encrypted database support.&nbsp; Encrypted databases are fully encrypted and
        support both binary and cleartext password types.</li>
      <LI>
      Visual Studio 2005 Design-Time Support, works with all versions of VS2005, including

      all Express Editions.&nbsp; You can add a SQLite 
      database to the Servers list, design queries with the Query Designer, 
      drag-and-drop tables onto a Typed DataSet, etc.
      <LI>
      Single file redistributable.&nbsp; The core sqlite3 codebase and the ADO.NET wrapper 
      are combined into one multi-module assembly.
      <LI>
................................................................................
    <strong></strong>
    <h2>
      <strong>Design-Time Support</strong></h2>
    <P>
      In Windows Explorer, navigate to the <STRONG>SQLite.NET\bin\Designer</STRONG>
        folder and execute the <STRONG>INSTALL.EXE</STRONG>
      file.&nbsp; The program will
      automatically detect what version(s) of Visual Studio 2005 are installed and allow
      you to selectively install and uninstall the designer for each edition.</P>
    <H2><STRONG>DbFactory Support (Non-Compact Framework)</STRONG></H2>
    In order to use the SQLiteFactory and have the SQLite data provider enumerated 
    in the DbProviderFactories methods, you must add the following segment into your application's app.config file:<br>
    <br>
    <pre>&lt;configuration&gt;
  &lt;system.data&gt;
................................................................................
    <p>
      The core sqlite engine is compiled directly from the unmodified source code available
      at the sqlite.org website.&nbsp; Several additional pieces are compiled on top of
      it to extend its functionality, but the core engine's source is not changed.</p>
    <p></p>
    <p>
      <b>Version History</b></p>


























    <p><b>1.0.46.0 - September 30, 2007</b></p>
    <ul>
    <li>Fixed faulty logic in type discovery code when using SQLiteDataReader.GetValue().</li>
      <li>Fixed Connection.Open() bug when dealing with :memory: databases.</li>
      <li>Fixed SQLiteCommand.ExecuteScalar() to return a properly-typed value.</li>
      <li>Added support for SQLiteParameter.ResetDbType().</li>
      <li>Added test cases for rigid and flexible type testing.</li>







|
|







 







|










|
>







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
31
32
33
34
35
36
37
38
39
40
41
42
43
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
  </head>
  <body>
    ADO.NET 2.0 SQLite Data Provider<br>
    Version 1.0.47.0 December 4, 2007<br>
    Using SQLite 3.5.3<br>
    Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br>
    Released to the public domain, use at your own risk!<br>
    Official provider website:&nbsp; <a href="http://sqlite.phxsoftware.com">http://sqlite.phxsoftware.com</a><br />
    <br>
    The latest version can be downloaded <a href="http://sourceforge.net/projects/sqlite-dotnet2">
      here</a>
    <br>
................................................................................
    <br>
    <b></b>
    <h2>
      <b>Features:</b><br>
    </h2>
    <UL>
      <LI>
      Written from scratch on VS2005/2008 specifically for ADO.NET 2.0, implementing all the
      base classes and features recently introduced in the framework, including automatic
      transaction enlistment.<li>Supports the Full
        and Compact .NET Framework, as well as native C/C++ development.&nbsp; 100% binary
        compatible with the original sqlite3.dll.</li>
      <LI>
      On the Compact Framework, it is faster than the newly-introduced Sql Server 
      Mobile.  SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, runs queries faster, and has a smaller database file size as well.
      <li>Encrypted database support.&nbsp; Encrypted databases are fully encrypted and
        support both binary and cleartext password types.</li>
      <LI>
      Visual Studio 2005/2008 Design-Time Support, works with all versions of VS2005/2008,
        including
      all Express Editions.&nbsp; You can add a SQLite 
      database to the Servers list, design queries with the Query Designer, 
      drag-and-drop tables onto a Typed DataSet, etc.
      <LI>
      Single file redistributable.&nbsp; The core sqlite3 codebase and the ADO.NET wrapper 
      are combined into one multi-module assembly.
      <LI>
................................................................................
    <strong></strong>
    <h2>
      <strong>Design-Time Support</strong></h2>
    <P>
      In Windows Explorer, navigate to the <STRONG>SQLite.NET\bin\Designer</STRONG>
        folder and execute the <STRONG>INSTALL.EXE</STRONG>
      file.&nbsp; The program will
      automatically detect what version(s) of Visual Studio 2005/2008 are installed and allow
      you to selectively install and uninstall the designer for each edition.</P>
    <H2><STRONG>DbFactory Support (Non-Compact Framework)</STRONG></H2>
    In order to use the SQLiteFactory and have the SQLite data provider enumerated 
    in the DbProviderFactories methods, you must add the following segment into your application's app.config file:<br>
    <br>
    <pre>&lt;configuration&gt;
  &lt;system.data&gt;
................................................................................
    <p>
      The core sqlite engine is compiled directly from the unmodified source code available
      at the sqlite.org website.&nbsp; Several additional pieces are compiled on top of
      it to extend its functionality, but the core engine's source is not changed.</p>
    <p></p>
    <p>
      <b>Version History</b></p>
    <p><b>1.0.47.0 - December 4, 2007</b></p>
    <ul>
      <li>Code merge with SQLite 3.5.3</li>
      <li>Added installer support for Visual Studio 2008.&nbsp; Code is still using the
        VS2005 SDK so one or two bells and whistles are missing, but nothing significant.</li>
      <li>This is the last version that the FTS1 and FTS2 extensions will appear.&nbsp;
        Everyone should rebuild their fulltext indexes using the new FTS3 module.&nbsp;
        FTS1 and FTS2 suffer from a design flaw that could cause database corruption with
        certain vacuum operations.</li>
      <li>Fixed pooled connections so they rollback any outstanding transactions before
        going to the pool.&nbsp; </li>
      <li>Fixed the unintended breaking of the TYPES keyword, and mis-typing of untyped
        or indeterminate column types. </li>
      <li>Assert a FileIOPermission() requirement in the static SQLiteFunction constructor.
      </li>
      <li>The CE-only SQLiteFunction.RegisterFunction() is now available on the desktop
        platform for dynamic registration of functions.&nbsp; You must still close and re-open
        a connection in order for the new function to be seen by a connection.</li>
      <li>Fixed the "database is locked" errors by implementing behavioral changes in the
        interop.c file for SQLite.&nbsp; Closing a database force-finalizes any prepared
        statements on the database to ensure the connection is fully closed.&nbsp; This
        was rather tricky because the GC thread could still be finalizing statements itself.
        &nbsp;</li>
      <li>Modifed the mergebin utility to help circumvent a long-standing strong name verification
        bug in the Compact Framework.</li>
    </ul>
    <p><b>1.0.46.0 - September 30, 2007</b></p>
    <ul>
    <li>Fixed faulty logic in type discovery code when using SQLiteDataReader.GetValue().</li>
      <li>Fixed Connection.Open() bug when dealing with :memory: databases.</li>
      <li>Fixed SQLiteCommand.ExecuteScalar() to return a properly-typed value.</li>
      <li>Added support for SQLiteParameter.ResetDbType().</li>
      <li>Added test cases for rigid and flexible type testing.</li>

Changes to test/Program.cs.

13
14
15
16
17
18
19










20
21
22
23





























24
25
26
27
28
29
30
    static void Main(string[] args)
    {
      DbProviderFactory fact;
      fact = DbProviderFactories.GetFactory("System.Data.SQLite");

      System.IO.File.Delete("test.db3");











      using (SQLiteConnection cnn = new SQLiteConnection())
      {
        cnn.ConnectionString = "Data Source=test.db3";
        cnn.Open();






























        TestCases.Run(fact, cnn);
      }

      Console.ReadKey();
    }








>
>
>
>
>
>
>
>
>
>
|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







13
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
    static void Main(string[] args)
    {
      DbProviderFactory fact;
      fact = DbProviderFactories.GetFactory("System.Data.SQLite");

      System.IO.File.Delete("test.db3");

      //SqlConnection cnn2 = new SqlConnection("Data Source=(local);Initial Catalog=iDiscover;Integrated Security=True");
      //cnn2.Open();
      //cnn2.BeginTransaction();
      //cnn2.Close();

      //cnn2 = new SqlConnection("Data Source=(local);Initial Catalog=iDiscover;Integrated Security=True");
      //cnn2.Open();
      //cnn2.BeginTransaction();
      //cnn2.Close();

      SQLiteConnection cnn = new SQLiteConnection();
      {
        cnn.ConnectionString = "Data Source=test.db3;Pooling=False;Password=yVXL39etehPX";
        cnn.Open();

        //using (DbCommand cmd = cnn.CreateCommand())
        //{
        //  cmd.CommandText = "CREATE TABLE Foo(ID integer primary key, myvalue varchar(50))";
        //  cmd.ExecuteNonQuery();

        //  cmd.CommandText = "CREATE TABLE Foo2(ID integer primary key, myvalue2)";
        //  cmd.ExecuteNonQuery();

        //  cmd.CommandText = "create view myview as select a.id, a.myvalue, b.myvalue2 from foo as a inner join foo2 as b on a.id = b.id";
        //  cmd.ExecuteNonQuery();

        //  cmd.CommandText = "select * from myview";
        //  using (DbDataReader reader = cmd.ExecuteReader())
        //  {
        //    DataTable tbl = reader.GetSchemaTable();

        //    Type t = reader.GetFieldType(0);
        //    t = reader.GetFieldType(1);
        //    t = reader.GetFieldType(2);
        //  }
        //}

        //cnn.BeginTransaction();
        //cnn.Close();

        //cnn = new SQLiteConnection("Data Source=test.db3;Pooling=True");
        //cnn.Open();
        //cnn.BeginTransaction();

        TestCases.Run(fact, cnn);
      }

      Console.ReadKey();
    }

Changes to test/TestCases.cs.

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
      }
    }

    internal static void FullTextTest(DbConnection cnn)
    {
      using (DbCommand cmd = cnn.CreateCommand())
      {
        cmd.CommandText = "CREATE VIRTUAL TABLE FullText USING FTS2(name, ingredients);";
        cmd.ExecuteNonQuery();

        string[] names = { "broccoli stew", "pumpkin stew", "broccoli pie", "pumpkin pie" };
        string[] ingredients = { "broccoli peppers cheese tomatoes", "pumpkin onions garlic celery", "broccoli cheese onions flour", "pumpkin sugar flour butter" };
        int n;

        cmd.CommandText = "insert into FullText (name, ingredients) values (@name, @ingredient);";







|







328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
      }
    }

    internal static void FullTextTest(DbConnection cnn)
    {
      using (DbCommand cmd = cnn.CreateCommand())
      {
        cmd.CommandText = "CREATE VIRTUAL TABLE FullText USING FTS3(name, ingredients);";
        cmd.ExecuteNonQuery();

        string[] names = { "broccoli stew", "pumpkin stew", "broccoli pie", "pumpkin pie" };
        string[] ingredients = { "broccoli peppers cheese tomatoes", "pumpkin onions garlic celery", "broccoli cheese onions flour", "pumpkin sugar flour butter" };
        int n;

        cmd.CommandText = "insert into FullText (name, ingredients) values (@name, @ingredient);";

Changes to testce/Program.cs.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
      {
      }

      using (cnn = new SQLiteConnection())
      {
        TestCases tests = new TestCases();

        cnn.ConnectionString = "Data Source=test.db3";
        cnn.Open();
        tests.Run(cnn);

        System.Windows.Forms.Application.Run(tests.frm);
      }
    }
  }
}







|








25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
      {
      }

      using (cnn = new SQLiteConnection())
      {
        TestCases tests = new TestCases();

        cnn.ConnectionString = "Data Source=test.db3;Password=yVXL39etehPX";
        cnn.Open();
        tests.Run(cnn);

        System.Windows.Forms.Application.Run(tests.frm);
      }
    }
  }
}

Changes to testce/TestCases.cs.

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
      }
    }

    internal static void FullTextTest(DbConnection cnn)
    {
      using (DbCommand cmd = cnn.CreateCommand())
      {
        cmd.CommandText = "CREATE VIRTUAL TABLE FullText USING FTS2(name, ingredients);";
        cmd.ExecuteNonQuery();

        string[] names = { "broccoli stew", "pumpkin stew", "broccoli pie", "pumpkin pie" };
        string[] ingredients = { "broccoli peppers cheese tomatoes", "pumpkin onions garlic celery", "broccoli cheese onions flour", "pumpkin sugar flour butter" };
        int n;

        cmd.CommandText = "insert into FullText (name, ingredients) values (@name, @ingredient);";







|







292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
      }
    }

    internal static void FullTextTest(DbConnection cnn)
    {
      using (DbCommand cmd = cnn.CreateCommand())
      {
        cmd.CommandText = "CREATE VIRTUAL TABLE FullText USING FTS1(name, ingredients);";
        cmd.ExecuteNonQuery();

        string[] names = { "broccoli stew", "pumpkin stew", "broccoli pie", "pumpkin pie" };
        string[] ingredients = { "broccoli peppers cheese tomatoes", "pumpkin onions garlic celery", "broccoli cheese onions flour", "pumpkin sugar flour butter" };
        int n;

        cmd.CommandText = "insert into FullText (name, ingredients) values (@name, @ingredient);";

Changes to testce/testce.csproj.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
    <Reference Include="mscorlib" />
    <Reference Include="System">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data.SQLite, Version=1.0.36.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Drawing">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Windows.Forms">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Xml">







|
<
<







51
52
53
54
55
56
57
58


59
60
61
62
63
64
65
    <Reference Include="mscorlib" />
    <Reference Include="System">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84, processorArchitecture=x86" />


    <Reference Include="System.Drawing">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Windows.Forms">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Xml">

Changes to tools/install/InstallDesigner.cs.

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
..
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
...
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
...
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
...
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
...
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
...
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
...
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
...
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
...
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
...
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
...
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
  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;
................................................................................
        _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");
          }

................................................................................
      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
      //{
................................................................................
        }
      }
      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")))
            {
................................................................................
            }
            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"));
................................................................................
              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();
................................................................................
            }
          }
        }
      }

      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("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";
        }
................................................................................
      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");
................................................................................
      }
      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);

................................................................................
      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
................................................................................
              key = null;
            }
          }
        }

        if (key == null)
        {
          key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\VCExpress\\8.0");
          if (key == null) return;
        }

        try
        {
          installDir = (string)key.GetValue("InstallDir");
        }







>













|



>
>







 







>
>
>






|













>
>
|
|
<
<
>
>

<
<
|
|
>
>
|
>
|
<




|





|



|







 







>
>


|




>



|

|




|

|



|







 







|


|

|












|












|


|

|







|

|







 







|







 







|



|







 







|







 







|







 







|




|










|



|







 







|



|



|




|




|




|







 







|







 







|






|







 







|







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
..
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
...
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
...
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
...
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
...
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
...
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
...
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
...
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
...
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
...
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
...
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
  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;
................................................................................
        _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");
          }

................................................................................
      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
      //{
................................................................................
        }
      }
      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")))
            {
................................................................................
            }
            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"));
................................................................................
              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();
................................................................................
            }
          }
        }
      }

      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("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";
        }
................................................................................
      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");
................................................................................
      }
      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);

................................................................................
      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
................................................................................
              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");
        }

Changes to tools/install/Resources/System.Data.SQLite.dll.

cannot compute difference between binary files

Changes to tools/mergebin/mergebin.cpp.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
29
30
31
32
33
34
35


36
37
38
39
40
41
42
..
52
53
54
55
56
57
58

59
60
61
62
63
64
65
...
101
102
103
104
105
106
107









108
109
110
111
112
113
114
115
116
117
118
119
...
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
...
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
...
482
483
484
485
486
487
488







489

490
491
492
493
494
495
496
497
498
499

#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;

................................................................................
/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 \
................................................................................
    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];
................................................................................
      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;
}

................................................................................
    _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\
................................................................................
      }
    }
  }
  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;
................................................................................
    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"));
}







|







 







>
>







 







>







 







>
>
>
>
>
>
>
>
>




|







 







|


|







 







|







 







>
>
>
>
>
>
>
|
>










7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
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
...
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
...
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
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

#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;

................................................................................
/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 \
................................................................................
    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];
................................................................................
      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;
}

................................................................................
    _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\
................................................................................
      }
    }
  }
  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;
................................................................................
    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"));
}

Changes to tools/mergebin/stdafx.h.

7
8
9
10
11
12
13

14
15
16


#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include <stdio.h>

#include <tchar.h>

// TODO: reference additional headers your program requires here







>

<

7
8
9
10
11
12
13
14
15

16


#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <tchar.h>

// TODO: reference additional headers your program requires here

Changes to tools/setup/exe/setup/setup.rc.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,46,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "SQLite ADO.NET 2.0 Setup"
            VALUE "FileVersion", "1.0.45.1"
            VALUE "InternalName", "setup"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "setup.exe"
            VALUE "ProductName", "System.Data.SQLite"
            VALUE "ProductVersion", "1.0"
        END
    END







|







 







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,47,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "SQLite ADO.NET 2.0 Setup"
            VALUE "FileVersion", "1.0.47.0"
            VALUE "InternalName", "setup"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "setup.exe"
            VALUE "ProductName", "System.Data.SQLite"
            VALUE "ProductVersion", "1.0"
        END
    END

Changes to tools/setup/sqlite_setup.suo.

cannot compute difference between binary files

Changes to tools/setup/sqlite_setup.vdproj.

618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
...
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
...
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
...
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
....
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
....
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
        {
        "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:"







|







 







|







 







|







 







|







 







|







 







|
|





|







618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
...
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
...
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
...
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
....
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
....
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
            "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"
                    }
................................................................................
        {
        "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:"