亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? glib-dynamic-loading-of-modules.html

?? glid編寫實例
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<html xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Dynamic Loading of Modules</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.0"><link rel="start" href="index.html" title="GLib Reference Manual"><link rel="up" href="glib-core.html" title="GLib Core Application Support"><link rel="prev" href="glib-Asynchronous-Queues.html" title="Asynchronous Queues"><link rel="next" href="glib-Memory-Allocation.html" title="Memory Allocation"><meta name="generator" content="GTK-Doc V1.4 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="glib.html" title="GLib Overview"><link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals"><link rel="chapter" href="glib-core.html" title="GLib Core Application Support"><link rel="chapter" href="glib-utilities.html" title="GLib Utilities"><link rel="chapter" href="glib-data-types.html" title="GLib Data Types"><link rel="chapter" href="tools.html" title="GLib Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="glib-Asynchronous-Queues.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="glib-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GLib Reference Manual</th><td><a accesskey="n" href="glib-Memory-Allocation.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="glib-Dynamic-Loading-of-Modules"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">Dynamic Loading of Modules</span></h2><p>Dynamic Loading of Modules &#8212; portable method for dynamically loading 'plug-ins'.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;gmodule.h&gt;            <a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a>;<a href="glib-Basic-Types.html#gboolean">gboolean</a>    <a href="glib-Dynamic-Loading-of-Modules.html#g-module-supported">g_module_supported</a>              (void);<a href="glib-Basic-Types.html#gchar">gchar</a>*      <a href="glib-Dynamic-Loading-of-Modules.html#g-module-build-path">g_module_build_path</a>             (const <a href="glib-Basic-Types.html#gchar">gchar</a> *directory,                                             const <a href="glib-Basic-Types.html#gchar">gchar</a> *module_name);<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a>*    <a href="glib-Dynamic-Loading-of-Modules.html#g-module-open">g_module_open</a>                   (const <a href="glib-Basic-Types.html#gchar">gchar</a> *file_name,                                             <a href="glib-Dynamic-Loading-of-Modules.html#GModuleFlags">GModuleFlags</a> flags);enum        <a href="glib-Dynamic-Loading-of-Modules.html#GModuleFlags">GModuleFlags</a>;<a href="glib-Basic-Types.html#gboolean">gboolean</a>    <a href="glib-Dynamic-Loading-of-Modules.html#g-module-symbol">g_module_symbol</a>                 (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module,                                             const <a href="glib-Basic-Types.html#gchar">gchar</a> *symbol_name,                                             <a href="glib-Basic-Types.html#gpointer">gpointer</a> *symbol);const <a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Dynamic-Loading-of-Modules.html#g-module-name">g_module_name</a>                  (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);void        <a href="glib-Dynamic-Loading-of-Modules.html#g-module-make-resident">g_module_make_resident</a>          (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);<a href="glib-Basic-Types.html#gboolean">gboolean</a>    <a href="glib-Dynamic-Loading-of-Modules.html#g-module-close">g_module_close</a>                  (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);const <a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Dynamic-Loading-of-Modules.html#g-module-error">g_module_error</a>                 (void);const <a href="glib-Basic-Types.html#gchar">gchar</a>* (<a href="glib-Dynamic-Loading-of-Modules.html#GModuleCheckInit">*GModuleCheckInit</a>)            (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);void        (<a href="glib-Dynamic-Loading-of-Modules.html#GModuleUnload">*GModuleUnload</a>)                (<a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);#define     <a href="glib-Dynamic-Loading-of-Modules.html#G-MODULE-SUFFIX:CAPS">G_MODULE_SUFFIX</a>#define     <a href="glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS">G_MODULE_EXPORT</a>#define     <a href="glib-Dynamic-Loading-of-Modules.html#G-MODULE-IMPORT:CAPS">G_MODULE_IMPORT</a></pre></div><div class="refsect1" lang="en"><a name="id2899031"></a><h2>Description</h2><p>These functions provide a portable way to dynamically load object files(commonly known as 'plug-ins').The current implementation supports all systems that providean implementation of <code class="function"><code class="function">dlopen()</code></code> (e.g. Linux/Sun), as well as HP-UX via its<code class="function"><code class="function">shl_load()</code></code> mechanism, and Windows platforms via DLLs.</p><p>A program which wants to use these functions must be linked to thelibraries output by the command <span><strong class="command">pkg-config --libs gmodule-2.0</strong></span>.</p><p>To use them you must first determine whether dynamic loadingis supported on the platform by calling <a href="glib-Dynamic-Loading-of-Modules.html#g-module-supported"><code class="function">g_module_supported()</code></a>.If it is, you can open a module with <a href="glib-Dynamic-Loading-of-Modules.html#g-module-open"><code class="function">g_module_open()</code></a>,find the module's symbols (e.g. function names) with <a href="glib-Dynamic-Loading-of-Modules.html#g-module-symbol"><code class="function">g_module_symbol()</code></a>,and later close the module with <a href="glib-Dynamic-Loading-of-Modules.html#g-module-close"><code class="function">g_module_close()</code></a>.<a href="glib-Dynamic-Loading-of-Modules.html#g-module-name"><code class="function">g_module_name()</code></a> will return the file name of a currently opened module.</p><p>If any of the above functions fail, the error status can be found with<a href="glib-Dynamic-Loading-of-Modules.html#g-module-error"><code class="function">g_module_error()</code></a>.</p><p>The <a href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> implementation features reference counting for opened modules,and supports hook functions within a module which are called when themodule is loaded and unloaded (see <a href="glib-Dynamic-Loading-of-Modules.html#GModuleCheckInit"><span class="type">GModuleCheckInit</span></a> and <a href="glib-Dynamic-Loading-of-Modules.html#GModuleUnload"><span class="type">GModuleUnload</span></a>).</p><p>If your module introduces static data to common subsystems in the runningprogram, e.g. through calling <code class="literal">g_quark_from_static_string ("my-module-stuff")</code>,it must ensure that it is never unloaded, by calling <a href="glib-Dynamic-Loading-of-Modules.html#g-module-make-resident"><code class="function">g_module_make_resident()</code></a>.</p><p></p><div class="example"><a name="id2899217"></a><p class="title"><b>Example&#160;12.&#160;Calling a function defined in a <span class="structname">GModule</span></b></p><pre class="programlisting">/* the function signature for 'say_hello' */typedef void (* SayHelloFunc) (const char *message);gbooleanjust_say_hello (const char *filename, GError **error){  SayHelloFunc  say_hello;  GModule      *module;  module = g_module_open (filename, G_MODULE_BIND_LAZY);  if (!module)    {      g_set_error (error, FOO_ERROR, FOO_ERROR_BLAH,		   "%s", g_module_error ());      return FALSE;    }  if (!g_module_symbol (module, "say_hello", (gpointer *)&amp;say_hello))    {      g_set_error (error, SAY_ERROR, SAY_ERROR_OPEN,		   "%s: %s", filename, g_module_error ());      if (!g_module_close (module))	g_warning ("%s: %s", filename, g_module_error ());      return FALSE;    }  /* call our function in the module */  say_hello ("Hello world!");  if (!g_module_close (module))    g_warning ("%s: %s", filename, g_module_error ());  return TRUE;}</pre></div><p></p></div><div class="refsect1" lang="en"><a name="id2899261"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2899266"></a><h3><a name="GModule"></a>GModule</h3><a class="indexterm" name="id2899275"></a><pre class="programlisting">typedef struct _GModule GModule;</pre><p>The <a href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> struct is an opaque data structure to represent a<a href="glib-Dynamic-Loading-of-Modules.html" title="Dynamic Loading of Modules">Dynamically-Loaded Module</a>.It should only be accessed via the following functions.</p></div><hr><div class="refsect2" lang="en"><a name="id2899311"></a><h3><a name="g-module-supported"></a>g_module_supported ()</h3><a class="indexterm" name="id2899322"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a>    g_module_supported              (void);</pre><p>Checks if modules are supported on the current platform.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td><code class="literal">TRUE</code> if modules are supported.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2899363"></a><h3><a name="g-module-build-path"></a>g_module_build_path ()</h3><a class="indexterm" name="id2899374"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>*      g_module_build_path             (const <a href="glib-Basic-Types.html#gchar">gchar</a> *directory,                                             const <a href="glib-Basic-Types.html#gchar">gchar</a> *module_name);</pre><p>A portable way to build the filename of a module. The platform-specificprefix and suffix are added to the filename, if needed, and the result isadded to the directory, using the correct separator character.</p><p>The directory should specify the directory where the module can be found.It can be <code class="literal">NULL</code> or an empty string to indicate that the module is in a standardplatform-specific directory, though this is not recommended since thewrong module may be found.</p><p>For example, calling <a href="glib-Dynamic-Loading-of-Modules.html#g-module-build-path"><code class="function">g_module_build_path()</code></a> on a Linux system with a <em class="parameter"><code>directory</code></em>of <code class="filename">/lib</code> and a <em class="parameter"><code>module_name</code></em> of "mylibrary" will return <code class="filename">/lib/libmylibrary.so</code>. On a Windows system, using <code class="filename">\Windows</code> as the directory it will return<code class="filename">\Windows\mylibrary.dll</code>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>directory</code></em>&#160;:</span></td><td>the directory where the module is. This can be <code class="literal">NULL</code> or the emptystring to indicate that the standard platform-specific directories will be used, though that is not recommended.</td></tr><tr><td><span class="term"><em class="parameter"><code>module_name</code></em>&#160;:</span></td><td>the name of the module.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td>the complete path of the module, including the standard libraryprefix and suffix. This should be freed when no longer needed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2899533"></a><h3><a name="g-module-open"></a>g_module_open ()</h3><a class="indexterm" name="id2899544"></a><pre class="programlisting"><a href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a>*    g_module_open                   (const <a href="glib-Basic-Types.html#gchar">gchar</a> *file_name,                                             <a href="glib-Dynamic-Loading-of-Modules.html#GModuleFlags">GModuleFlags</a> flags);</pre><p>Opens a module. If the module has already been opened, its referencecount is incremented. </p><p>First of all <a href="glib-Dynamic-Loading-of-Modules.html#g-module-open"><code class="function">g_module_open()</code></a> tries to open <em class="parameter"><code>file_name</code></em> as a module. Ifthat fails and <em class="parameter"><code>file_name</code></em> has the ".la"-suffix (and is a libtool archive) it tries to open the corresponding module. If that fails and it doesn't have the proper module suffix for the platform (<a href="glib-Dynamic-Loading-of-Modules.html#G-MODULE-SUFFIX:CAPS"><span class="type">G_MODULE_SUFFIX</span></a>), this suffix will be appended and the corresponding module will be opended. If that fails and <em class="parameter"><code>file_name</code></em> doesn't have the ".la"-suffix, this suffix is appended and <a href="glib-Dynamic-Loading-of-Modules.html#g-module-open"><code class="function">g_module_open()</code></a> tries to open the corresponding module. If eventually that fails as well, <code class="literal">NULL</code> is returned.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>file_name</code></em>&#160;:</span></td><td>the name of the file containing the module.</td></tr><tr><td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td><td>the flags used for opening the module. This can be the logicalOR of any of the <a href="glib-Dynamic-Loading-of-Modules.html#GModuleFlags"><span class="type">GModuleFlags</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td>a <a href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> on success, or <code class="literal">NULL</code> on failure.</td></tr></tbody></table></div></div><hr>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99久久久国产精品潘金| 国产高清无密码一区二区三区| 26uuu亚洲综合色| 色域天天综合网| 极品尤物av久久免费看| 亚洲欧美电影一区二区| 日韩精品最新网址| 色丁香久综合在线久综合在线观看| 国内久久婷婷综合| 丝袜美腿亚洲色图| 亚洲欧洲综合另类| 中文字幕久久午夜不卡| 日韩欧美一级二级| 欧美视频一区二区三区在线观看| 国产999精品久久| 韩国欧美国产一区| 热久久免费视频| 亚洲超碰97人人做人人爱| 国产精品久久久久久久久果冻传媒| 欧美成人r级一区二区三区| 欧美在线视频日韩| 色综合久久久网| 不卡一区在线观看| 国产不卡高清在线观看视频| 美国十次了思思久久精品导航| 亚洲成人精品影院| 亚洲欧美视频在线观看视频| 国产精品乱码人人做人人爱| 2021久久国产精品不只是精品| 7777精品伊人久久久大香线蕉完整版 | 亚洲精品国产品国语在线app| 国产午夜精品一区二区三区视频| 日韩视频免费直播| 欧美二区三区的天堂| 欧美午夜电影一区| 91丝袜美腿高跟国产极品老师 | 风间由美一区二区三区在线观看| 麻豆精品一二三| 久色婷婷小香蕉久久| 青青草原综合久久大伊人精品| 午夜在线成人av| 午夜精品视频一区| 国产成人精品一区二| 国产一区二区网址| 国产综合一区二区| 国产成人高清视频| 成人美女视频在线观看18| 丁香一区二区三区| 成人国产精品免费观看| 白白色 亚洲乱淫| 一本到高清视频免费精品| 91一区二区在线| 欧美最新大片在线看| 欧美日韩高清一区二区三区| 欧美一级一区二区| 精品人伦一区二区色婷婷| 久久久三级国产网站| 国产欧美一区二区三区在线老狼| 中文字幕一区av| 亚洲一区二区中文在线| 秋霞电影网一区二区| 国产一区二区看久久| av成人老司机| 欧美四级电影在线观看| 欧美一级理论性理论a| 2020日本不卡一区二区视频| 国产精品久久久久精k8| 一区二区在线观看不卡| 日韩vs国产vs欧美| 国产真实精品久久二三区| 成人性生交大合| 欧美丝袜第三区| 久久综合视频网| 日韩理论片在线| 蜜桃视频在线观看一区二区| 成人在线视频一区| 欧美日韩国产a| 久久久亚洲高清| 一区二区三区免费网站| 日本欧美肥老太交大片| 国产91精品在线观看| 欧美婷婷六月丁香综合色| 欧美不卡一区二区三区| 亚洲欧美日韩国产另类专区| 理论电影国产精品| 99久久国产综合精品色伊| 337p亚洲精品色噜噜| 国产精品午夜免费| 午夜电影网一区| 成人国产一区二区三区精品| 欧美美女喷水视频| 国产精品欧美极品| 日本不卡一区二区三区| av在线不卡电影| 日韩一区二区三区三四区视频在线观看 | 国产一区二区免费在线| 色菇凉天天综合网| 久久久精品人体av艺术| 亚洲成人福利片| 国产成人精品免费| 欧美一级久久久久久久大片| 亚洲精品国久久99热| 国产在线播精品第三| 欧美三级中文字| 亚洲日本一区二区| 国产精品亚洲午夜一区二区三区| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲高清免费观看高清完整版在线观看 | 国产网站一区二区| 人禽交欧美网站| 欧美亚洲综合色| 中文字幕综合网| 粉嫩在线一区二区三区视频| 日韩三级在线观看| 天天综合色天天综合色h| 91亚洲国产成人精品一区二区三| 国产无遮挡一区二区三区毛片日本| 日韩高清不卡一区二区三区| 在线观看av不卡| 亚洲欧洲精品天堂一级| 国产传媒久久文化传媒| 日韩免费看的电影| 丝袜亚洲另类丝袜在线| 欧美少妇一区二区| 亚洲日本在线a| 色综合一个色综合| 中文字幕佐山爱一区二区免费| 成人午夜伦理影院| 久久久精品欧美丰满| 国产在线视频精品一区| 精品国一区二区三区| 美女视频一区在线观看| 欧美一区二区在线看| 日韩av一级电影| 91精品国产手机| 日韩高清不卡在线| 91精品国产欧美一区二区18| 五月婷婷综合网| 欧美日韩1234| 免费黄网站欧美| 欧美大肚乱孕交hd孕妇| 日本在线不卡视频| 欧美一区二区黄色| 久久精品噜噜噜成人av农村| 日韩免费高清av| 国产一区二区美女诱惑| 国产欧美日韩精品在线| 夫妻av一区二区| 亚洲日本电影在线| 色狠狠一区二区| 五月婷婷久久综合| 日韩美女视频一区二区在线观看| 黄网站免费久久| 国产精品久久久久久福利一牛影视| 一本色道综合亚洲| 亚洲狠狠爱一区二区三区| 91精品午夜视频| 精品一区二区三区免费观看| 欧美国产精品中文字幕| 99re在线精品| 午夜av一区二区| 久久亚洲影视婷婷| 不卡一二三区首页| 亚洲国产中文字幕在线视频综合| 8v天堂国产在线一区二区| 韩国女主播成人在线观看| 中文字幕永久在线不卡| 欧美午夜影院一区| 精品一区二区综合| 亚洲欧洲日本在线| 欧美日韩成人一区二区| 国产一区二区三区免费看| 中文字幕高清不卡| 欧美怡红院视频| 久久精品国产99国产| 国产精品久久久久桃色tv| 欧美日韩一区在线观看| 国产一区二区三区香蕉| 亚洲免费在线看| 精品处破学生在线二十三| 99久久免费精品| 老司机免费视频一区二区| 亚洲色图丝袜美腿| 日韩一区二区三区三四区视频在线观看| 国产一区二区精品久久99| 亚洲人妖av一区二区| 日韩一区二区视频| 色综合天天综合在线视频| 国内精品嫩模私拍在线| 亚洲影院久久精品| 国产丝袜欧美中文另类| 欧美老肥妇做.爰bbww| 成人晚上爱看视频| 蜜桃av噜噜一区二区三区小说| 亚洲欧美日韩国产中文在线| 久久亚洲综合色| 欧美一级电影网站| 欧美中文字幕一区| 成人性生交大片免费看视频在线 | 亚洲国产va精品久久久不卡综合 |