On Thu, Feb 4, 2016 at 9:15 AM, Artur Kr?l <artur.krol.eleader at sqlite.org> wrote:
> Hi, > > I am getting a weird behaviour when using Universal App Platform library > v. 3.10.2.0. The problem occurs when application is build for x86 only ? > build for arm and x64 works good. > > Here is the case: > I have a wrapper from pure SqLite dll to c# in my code (using DllImport > attributes in c#). I am trying to query custom function registered by > sqlite3_create_function_v2 - register working well in all builds. Function > is also correctly invoked in all builds (checked in debug mode by > brakepoint) but SqLite ?step? into result works only for arm and x64 build > ? for x86crashes with .Net NullReferenceException. > > I attached zipped test project (Visual Studio 2015 with UAP SDK is > required) ? have to change build platforms only (x86,x64,arm) to get this > case. I think it could be SqLite bug in x86 dll. > I've not used the UAP library, so take this for what it is worth. Your description leads me to think there is a calling convention incompatibility. Due to the age of the x86 platform, there are a lot of calling conventions available and if you don't pick the right one, Bad Things(TM) can happen. From what I read online, 64 bit calling convention in Windows is simple (there is only one) and I would suspect ARM would be a bit more standardized. -- Scott Robison