Sorry, the message was directed to Henrick Raeder: > In declaration: > procedure sqlite3_enable_load_extension(db: string; onoff: integer); > stdcall; far; external 'sqlite3.dll';
3 things which look odd are: - the stdcall calling convention - the delphi string parameter - C knows nothing of delphi's reference counted strings, and by looking at Andre's declaration, it looks very likely that Henrick's declaration is wrong. - procedure declaration rather than function (thus being unable to check the return value if it failed on that call) (and "far" is a no-op in 32 bit delphi, but not an error) HTH R. On 14/08/07, Andre du Plessis <[EMAIL PROTECTED]> wrote: > No it is all cdecl, which is what I am seeing in the message? :) > > -----Original Message----- > From: Roberto [mailto:[EMAIL PROTECTED] > Sent: 13 August 2007 04:42 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Problem loading extension in Delphi (FTS2) > > Might be a typo, but your declaration defines the calling convention > as 'stdcall' (instead of 'cdecl'), was your sqlite3.dll custom built > with this calling convention? I don't think much of sqlite would work > with stdcall. > > On 13/08/07, Andre du Plessis <[EMAIL PROTECTED]> wrote: > > > > sqlite3_enable_load_extension : function (sqlite3_value: Pointer; AOnOff: > > Integer): Integer; cdecl; > > sqlite3_load_extension : function (sqlite3_value: Pointer; AFileName, > > AProcedure : PChar; > > var AErrorMsg : PChar): Integer; cdecl; > > > > var > > Error : Pchar; > > ConnectionHandle : Pointer; // Handle you got from call to sqlite3_open > > begin > > sqlite3_load_extension(ConnectionHandle, 'fts2.dll', nil, Error)); > > > > This all worked very well for me. > > > > the problem as you say is that Aducom component does not expose this > > property for you, but as far as I know you get the source for the component > > is available so it's a small change for you to expose it. > > > > The problem with DISQLite3 is that it is not free and the sources for the > > component is not available. > > > > Where fts and sqlite is and there are good documentation for fts. > > > > > > -----Original Message----- > > From: Ralf Junker [mailto:[EMAIL PROTECTED] > > Sent: 10 August 2007 03:14 PM > > To: sqlite-users@sqlite.org > > Subject: Re: [sqlite] Problem loading extension in Delphi (FTS2) > > > > Hello Henrik Ræder, > > > > >I'm trying to load the FTS2 extension in Delphi, using the Aducom > > >components. Am really close, but still stuck, and thinking it's a problem > > >with the parameter to sqlite3_enable_load_extension(). > > > > DISQLite3 (http://www.yunqa.de/delphi/sqlite3/) does not expose such > > problems. > > > > Look at the full text search demo project which incorporates both FTS1 and > > FTS2 into a single *.exe application, with _no_ DLLs or external files > > needed. > > > > The new customizable tokenizer interface will be demonstrated by a > > Unicode-aware Pascal tokenizer with the upcoming version of DISQLite3 as > > soon as the FTS vacuum fix is official released. > > > > Ralf > > > > > > ----------------------------------------------------------------------------- > > To unsubscribe, send email to [EMAIL PROTECTED] > > ----------------------------------------------------------------------------- > > > > > > ----------------------------------------------------------------------------- > > To unsubscribe, send email to [EMAIL PROTECTED] > > ----------------------------------------------------------------------------- > > > > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > >