I went to try and file this as a ticket, but it appears that feature
has been disabled for the "anonymous" login method.

Anyways, the new release's processor detection and native library
pre-loading has a nearly show-stopper bug for me.  The processor
detection uses Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"),
which is supposed to reveal the architecture for the process, but it
does not work 100% correctly.  For example, see
http://stackoverflow.com/questions/4152294/processor-architecture-returns-amd64-in-some-32-bit-processes
... I'm seeing essentially the same problem, I have a 32 bit process
but PROCESSOR_ARCHITECTURE is coming up AMD64.  This mostly seems to
have something to do with launching the application from Visual Studio
(for me at least), but that's a pretty common and essential use case.

The upshot is that starting any of my 32 bit applications from VS2010
on 64 bit windows, it tries to load the wrong DLL and thus throws an
exception and dies.

I can work around this by using No_PreLoadSQLite and using the
architecture specific LoadLibrary call I wrote myself for prior
versions, but it would be nice to fix this "for real".

There are some handy process architecture properties available in .Net
4, but for maximum compatibility, I think the most reliable thing to
do is to check for IntPtr.Size == 4 implying that the process is x86,
regardless of what PROCESSOR_ARCHITECTURE says.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to