SQLitePCL.raw: Incorrect calling convention in UnmanagedCallersOnly

We are using the sqlite3_config_log API. Apparently somewhere between 2.0.7 and 2.1.0 you switched to use UnmanagedCallersOnly. Unfortunately, this means the decorated callback now defaults to the platform calling convention which is stdcall on Windows. The native library (e_sqlite3) expects cdecl though. This mismatch causes access violation once the registered callbacks returns back to the native code.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Ah. That makes sense. Yes, quite “complicated”.

I’m working now on reworking your fix to avoid the net6.0-ios problem.

FWIW, version 2.1.1-pre20220822172036 contains this fix. If there are no problems with it, I will publish it as a non-pre release next week. Reopening this issue until I ship a non-pre-release containing its fix.