int sqlite3_load_extension( sqlite3* db, const char* file, const char* entry_point, char** errmsg );
db
A database connection.
file
The path and filename of the extension.
entry_point
The name of the entry-point function. If this
is NULL, the name sqlite3_extension_init
will be
used.
errmsg
An optional reference to a string pointer. If
the function returns anything other than SQLITE_OK
, and error
message will be passed back. If no error is
encountered, the pointer will be set to NULL. The
reference may be NULL to ignore error messages.
Error messages must be freed with sqlite3_free()
.
An SQLite result code.
This function attempts to load an SQLite dynamic extension. By
default, the use of dynamic extensions are disabled, and must be
enabled using the sqlite3_enable_load_extension()
call.
This function is also exposed as the load_extension()
SQL function.
Although there are no limits on when an extension may be loaded,
many extensions register new functions and are thus subject to
the limits of sqlite3_create_function()
.
For more information on dynamic extensions, please see the section Using Loadable Extensions.
sqlite3_enable_load_extension() [C API, Ap G], sqlite3_create_function() [C API, Ap G], load_extension() [SQL Func, Ap E]