But Roger, the  "layer sitting in front of SQLite"  is a programming
environment which provides its own (black-box) connectivity to SQLite, and
it isn't going to be calling any DLL into which one will have injected a UDF
library in the manner you have laid out, and it's not going to let the
developer load an extension either.   That's what I've been trying to make
clear.

Regards
Tim Romano
Swarthmore PA


On Mon, Jul 26, 2010 at 12:07 PM, Roger Binns <rog...@rogerbinns.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/26/2010 06:03 AM, Tim Romano wrote:
> >  The goal is to expose the UDF to the "layer sitting in front".  Are you
> > saying sqlite3_auto_extension allows me to run a program, once, that will
> > register a piece of code that is loaded whenever ANY OTHER PROGRAM
> creates a
> > connection to my database file?  And that this happens *transparently* --
>
> Nope.  You have to do something each program session.  The steps:
>
> - - LoadLibrary("sqlite.dll") then call sqlite3_auto_extension registering
> callback that adds UDF etc
> - - Now use your database access layer
>
> The operating system will use the already loaded sqlite dll rather than
> loading an additional copy when the database access layer requests SQLite
> and then the callback is called when each database is opened (aka
> "connection").
>
> You can also do the first step using a technique known as dll injection
> where you have a shared library that loads SQLite, calls auto_extension,
> implements whatever UDF functions you want etc.  Your library is then
> automatically loaded and run in any process:
>
>  http://en.wikipedia.org/wiki/DLL_injection
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxNstQACgkQmOOfHg372QTzyACg3R2pBsKSJT/a5g6ApMc1Ul1D
> +i0AoIAHw4m+X8sIXA0EXPmbd3blmcSp
> =E8dR
> -----END PGP SIGNATURE-----
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to