⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initialize.html

📁 sqlite3源码,适合作为嵌入式(embedded)
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Initialize The SQLite Library</title><style type="text/css">body {    margin: auto;    font-family: "Verdana" "sans-serif";    padding: 8px 1%;}a { color: #45735f }a:visited { color: #734559 }.logo { position:absolute; margin:3px; }.tagline {  float:right;  text-align:right;  font-style:italic;  width:240px;  margin:12px;  margin-top:58px;}.toolbar {  font-variant: small-caps;  text-align: center;  line-height: 1.6em;  margin: 0;  padding:1px 8px;}.toolbar a { color: white; text-decoration: none; padding: 6px 12px; }.toolbar a:visited { color: white; }.toolbar a:hover { color: #80a796; background: white; }.content    { margin: 5%; }.content dt { font-weight:bold; }.content dd { margin-bottom: 25px; margin-left:20%; }.content ul { padding:0px; padding-left: 15px; margin:0px; }/* rounded corners */.se  { background: url(../images/se.png) 100% 100% no-repeat #80a796}.sw  { background: url(../images/sw.png) 0% 100% no-repeat }.ne  { background: url(../images/ne.png) 100% 0% no-repeat }.nw  { background: url(../images/nw.png) 0% 0% no-repeat }</style><meta http-equiv="content-type" content="text/html; charset=UTF-8">  </head><body><div><!-- container div to satisfy validator --><a href="../index.html"><img class="logo" src="../images/SQLite.gif" alt="SQLite Logo" border="0"></a><div><!-- IE hack to prevent disappearing logo--></div><div class="tagline">Small. Fast. Reliable.<br>Choose any three.</div><table width=100% style="clear:both"><tr><td>  <div class="se"><div class="sw"><div class="ne"><div class="nw">  <div class="toolbar">    <a href="../about.html">About</a>    <a href="../sitemap.html">Sitemap</a>    <a href="../docs.html">Documentation</a>    <a href="../download.html">Download</a>    <a href="../copyright.html">License</a>    <a href="../news.html">News</a>    <a href="http://www.sqlite.org/cvstrac/index">Developers</a>    <a href="../support.html">Support</a>  </div></div></div></div></div></td></tr></table>  <a href="intro.html"><h2>SQLite C Interface</h2></a><h2>Initialize The SQLite Library</h2><blockquote><pre>int sqlite3_initialize(void);int sqlite3_shutdown(void);int sqlite3_os_init(void);int sqlite3_os_end(void);</pre></blockquote><p>The sqlite3_initialize() routine initializes theSQLite library.  The sqlite3_shutdown() routinedeallocates any resources that were allocated by sqlite3_initialize().</p><p>A call to sqlite3_initialize() is an "effective" call if it isthe first time sqlite3_initialize() is invoked during the lifetime ofthe process, or if it is the first time sqlite3_initialize() is invokedfollowing a call to sqlite3_shutdown().  Only an effective callof sqlite3_initialize() does any initialization.  All other callsare harmless no-ops.</p><p>Among other things, sqlite3_initialize() shall invokesqlite3_os_init().  Similarly, sqlite3_shutdown()shall invoke sqlite3_os_end().</p><p>The sqlite3_initialize() routine returns <a href="../c3ref/c_abort.html">SQLITE_OK</a> on success.If for some reason, sqlite3_initialize() is unable to initializethe library (perhaps it is unable to allocate a needed resource suchas a mutex) it returns an <a href="../c3ref/c_abort.html">error code</a> other than <a href="../c3ref/c_abort.html">SQLITE_OK</a>.</p><p>The sqlite3_initialize() routine is called internally by many otherSQLite interfaces so that an application usually does not need toinvoke sqlite3_initialize() directly.  For example, <a href="../c3ref/open.html">sqlite3_open()</a>calls sqlite3_initialize() so the SQLite library will be automaticallyinitialized when <a href="../c3ref/open.html">sqlite3_open()</a> is called if it has not be initializedalready.  However, if SQLite is compiled with the <a href="../compile.html#omit_autoinit">SQLITE_OMIT_AUTOINIT</a>compile-time option, then the automatic calls to sqlite3_initialize()are omitted and the application must call sqlite3_initialize() directlyprior to using any other SQLite interface.  For maximum portability,it is recommended that applications always invoke sqlite3_initialize()directly prior to using any other SQLite interface.  Future releasesof SQLite may require this.  In other words, the behavior exhibitedwhen SQLite is compiled with <a href="../compile.html#omit_autoinit">SQLITE_OMIT_AUTOINIT</a> might become thedefault behavior in some future release of SQLite.</p><p>The sqlite3_os_init() routine does operating-system specificinitialization of the SQLite library.  The sqlite3_os_end()routine undoes the effect of sqlite3_os_init().  Typical tasksperformed by these routines include allocation or deallocationof static resources, initialization of global variables,setting up a default <a href="../c3ref/vfs.html">sqlite3_vfs</a> module, or setting upa default configuration using <a href="../c3ref/config.html">sqlite3_config()</a>.</p><p>The application should never invoke either sqlite3_os_init()or sqlite3_os_end() directly.  The application should only invokesqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()interface is called automatically by sqlite3_initialize() andsqlite3_os_end() is called by sqlite3_shutdown().  Appropriateimplementations for sqlite3_os_init() and sqlite3_os_end()are built into SQLite when it is compiled for unix, windows, or os/2.When built for other platforms (using the <a href="../compile.html#os_other">SQLITE_OS_OTHER=1</a> compile-timeoption) the application must supply a suitable implementation forsqlite3_os_init() and sqlite3_os_end().  An application-suppliedimplementation of sqlite3_os_init() or sqlite3_os_end()must return <a href="../c3ref/c_abort.html">SQLITE_OK</a> on success and some other <a href="../c3ref/c_abort.html">error code</a> uponfailure.</p><p>See also lists of  <a href="objlist.html">Objects</a>,  <a href="constlist.html">Constants</a>, and  <a href="funclist.html">Functions</a>.</p><hr><small><i>This page last modified 2008/12/09 18:44:04 UTC</i></small></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -