Does it work with SQLite's mixed-mode assembly?

Oct 25, 2013 at 2:45 PM
System.Data.SQLite provides a mixed-mode assembly that contains the native SQLite library along with its managed ADO.NET wrapper in a single DLL file. They're also available as separate files, but we're here with LibZ to reduce the number of files, right? So what I'm asking is, can LibZ also handle the single file version of SQLite? I haven't tried yet but maybe somebody already has some experience with it.
Coordinator
Oct 25, 2013 at 3:31 PM
Edited Oct 25, 2013 at 4:12 PM
Note: I was using System.Data.SQLite 1.0.66.0. It might have been changed in most recent version.

There is something peculiar about System.Data.SQLite. It's not mixed-mode assembly as I know them. SQLite actually imports itself as native .dll. At least it looks to me like that.

Check this out, this is unmanaged method declared in System.Data.SQLite:
// System.Data.SQLite.UnsafeNativeMethods
[DllImport("System.Data.SQLite.DLL")]
internal static extern int sqlite3_open_interop(byte[] utf8Filename, int flags, out IntPtr db);
and how native method in mixed-mode assembly should look like:
[SuppressUnmanagedCodeSecurity]
[MethodImpl(MethodImplOptions.Unmanaged | MethodImplOptions.PreserveSig)]
internal unsafe static extern int I32_LZ4_uncompress(sbyte*, sbyte*, int);
Note: SQLite DllImports from itself. It's not LibZ fault, the method is in loaded assembly but when it is about to be executed SQLite tries to explicitly load it from file (which isn't there).

So, as far as I know, the answer is: no. SQLite .dll have to be a physical file.
Oct 25, 2013 at 3:42 PM
Okay, that's the old version. (Very old by now...) Here are the latest downloads: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki (SQLite took it over by themselves some time back.) But thanks for the first confirmation of what I thought.
Coordinator
Oct 25, 2013 at 4:11 PM
Edited Oct 25, 2013 at 4:12 PM
Confirmed 1.0.88.0 still does the same thing: DllImports itself.