On Fri, Jul 19, 2013 at 3:49 PM, Sqlite Dog <sqlite...@gmail.com> wrote:
> That's interesting. What about pas file with function declarations to > SQLite API? Should it be modified somehow? > > If you use static dll loading and linking, Instead of declaring API functions as external 'sqlite3.dll' you declare them as plain external. The linker will automatically link to their implementation from the object file sqlite3.obj by name. If you have dynamic dll loading then you must have declared them as function prototypes and assign them by hand using GetProcAddress() after calling LoadLibrary() for SqLite3.dll. In this case the sqlite header API file will require more modifications. For instance this: var sqlite3_open: function(filename: PUTF8Char; var DB: Pointer): integer; cdecl; will have to be changed to this: function sqlite3_open(filename: PUTF8Char; var DB: Pointer): integer; cdecl; external; but if the names of the function pointer variables are as in the amalgamation then every unit that uses the API unit and calls its functions will not need any modifications. For example the following code: Rslt := sqlite3_open(FileName, db); compiles with both declarations. HTH. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users