SQLite.Net-PCL icon indicating copy to clipboard operation
SQLite.Net-PCL copied to clipboard

UWP: Crash in .NET native release builds when consuming winsqlite3.dll

Open rigdern opened this issue 7 years ago • 0 comments

Two changes need to be made to all of the DllImports for "winsqlite3":

  1. Calling convention has to be switched from Cdecl to StdCall
  2. ExactSpelling has to be set to true

For example:

[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.Cdecl)]

should be:

[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)]

rigdern avatar Jan 12 '18 23:01 rigdern