SQLite Forum

SQLite3 v3.34 ANOMALY - Precompiled Binaries for Windows
Login
You're not specifying the calling convention type for the callback method.  This will tend to be fatal for x86 DLLs that use the cdecl calling convention, like the SQLite dll.

In other words, if you change your callback definition to something like this:

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    internal delegate int Callback(IntPtr p, int n, [In][MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr, SizeParamIndex = 1)] string[] names, [In][MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr, SizeParamIndex = 1)] string[] values);

It'll work with the x86 without corrupting the stack.