SQLite.Net-PCL
SQLite.Net-PCL copied to clipboard
UWP: Crash in .NET native release builds when consuming winsqlite3.dll
Two changes need to be made to all of the DllImports
for "winsqlite3":
- Calling convention has to be switched from
Cdecl
toStdCall
-
ExactSpelling
has to be set totrue
For example:
[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.Cdecl)]
should be:
[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)]