*** DRAFT ***

About Sitemap Documentation Download License News Support |

## SQLite C Interface

## Load An Extension

>     int sqlite3_load_extension(
>       sqlite3 *db,          /* Load the extension into this database connection */
>       const char *zFile,    /* Name of the shared library containing extension */
>       const char *zProc,    /* Entry point.  Derived from zFile if 0 */
>       char **pzErrMsg       /* Put error message here if not 0 */
>     );

This interface loads an SQLite extension library from the named file.

The sqlite3_load_extension() interface attempts to load an SQLite extension library contained in the file zFile.

The entry point is zProc. zProc may be 0, in which case the name of the entry point defaults to "sqlite3_extension_init". The sqlite3_load_extension() interface returns SQLITE_OK on success and SQLITE_ERROR if something goes wrong. If an error occurs and pzErrMsg is not 0, then the sqlite3_load_extension() interface shall attempt to fill *pzErrMsg with error message text stored in memory obtained from sqlite3_malloc(). The calling function should free this memory by calling sqlite3_free().

Extension loading must be enabled using sqlite3_enable_load_extension() prior to calling this API, otherwise an error will be returned.

See also the load_extension() SQL function.

See also lists of Objects, Constants, and Functions.

*** DRAFT ***