[yunqa.de] Re: Support for load_extension() function in SQLiteSpy

  • From: "Tom Holden" <ve3meo@xxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Mon, 7 Mar 2011 15:27:57 -0500

Would this be a way to introduce a custom collation sequence to SQLiteSpy?

If so, can you give me a general guideline on how to do so. I am not a DISQLite3 developer.

Regards,
Tom

-----Original Message----- From: Delphi Inspiration
Sent: Wednesday, March 02, 2011 9:22 AM
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: Support for load_extension() function in SQLiteSpy

I have just finished implementing loadable extension support for
DISQLite3 and SQLiteSpy. Both support the same type of extensions,
namely those compiled with "fastcall" (C++ Builder) or "register"
(Delphi) calling convention.

This means that any default SQLite extensions compiled with "cdecl"
calling convention will not work. The results of loading "cdecl"
extensions are undefined. Consequences are unpredictable and might cause
applications to crash.

As a precaution, SQLiteSpy issues prominent warnings before it loads
extensions. Users must explicitly assert that they are loading a
"fastcall" extension or it will not be authorized.

Background to the curious: DISQLite3 and SQLiteSpy use "fastcall"
calling conventions, which is the Delphi default. It uses up to 3
register to pass parameters and slightly faster than "cdecl". I
experimented with wrapping "cdecl" extension calls to "fastcall"
DISQLite3 library calls. Unfortunately, this failed at the point where
callback functions must be wrapped as well. This is unfortunately not
possible according to my knowledge.

DISQLite3 contains a new extension demo project in

 \DISQLite3\Demos\DISQLite3_Extension\

It shows the basic principle of writing DISQLite3 extensions and how to
call them from the main application.

As usual, downloads are available from http://www.yunqa.de/.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa


_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: