亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国内精品在线播放| 激情深爱一区二区| 国产欧美日韩卡一| 欧美日韩黄色影视| 成人免费高清在线| 日本不卡在线视频| 一区二区三区在线视频观看58 | 首页综合国产亚洲丝袜| 国产欧美日韩精品一区| 欧美大片在线观看一区| 欧美私模裸体表演在线观看| 成人性生交大片免费看视频在线| 日韩中文字幕1| 一卡二卡欧美日韩| 国产精品女主播av| 国产视频一区二区三区在线观看| 欧美一二三区在线观看| 欧美午夜电影在线播放| 色综合久久综合网| 成人听书哪个软件好| 国内精品视频666| 七七婷婷婷婷精品国产| 午夜视频一区二区三区| 一区二区三区在线免费视频| 国产精品电影院| 久久久精品影视| 久久综合狠狠综合久久激情| 777奇米四色成人影色区| 精品视频在线视频| 在线国产电影不卡| 欧美影院午夜播放| 一本到不卡免费一区二区| www.日本不卡| 97国产精品videossex| 高清免费成人av| 成人综合在线观看| 成人在线综合网| thepron国产精品| jiyouzz国产精品久久| 成人黄色av网站在线| 国产91精品欧美| 成人美女视频在线观看18| 成人高清视频在线| 91在线视频网址| 91福利国产精品| 欧美日韩一区二区三区四区| 欧美日韩国产精品自在自线| 欧美日韩精品专区| 欧美一区二区在线观看| 91精品国产aⅴ一区二区| 欧美一区二区三区视频免费| 日韩欧美在线影院| 久久先锋影音av| 欧美国产精品一区二区三区| 亚洲欧洲日本在线| 一区二区国产盗摄色噜噜| 三级久久三级久久久| 麻豆成人综合网| 国产精品一区2区| 91视视频在线直接观看在线看网页在线看| 91蜜桃网址入口| 欧美精品在线观看一区二区| 日韩免费高清av| 国产精品视频看| 亚洲综合在线电影| 麻豆精品国产传媒mv男同| 大胆欧美人体老妇| 欧美日韩精品二区第二页| 精品国产乱码久久久久久夜甘婷婷 | 韩国午夜理伦三级不卡影院| 成人免费视频播放| 91成人在线免费观看| 日韩一区二区电影| 中文字幕久久午夜不卡| 亚洲国产一二三| 久久99国产精品尤物| 成人av网站免费观看| 欧美日韩中文字幕一区二区| 久久久久国产精品人| 一区二区三区在线高清| 麻豆国产精品一区二区三区 | 日韩高清不卡一区| 成人激情校园春色| 7777精品伊人久久久大香线蕉超级流畅 | 国产欧美日韩精品在线| 亚洲一二三四区| 国产成人精品影院| 欧美性生活久久| 久久综合色8888| 一区二区三区在线不卡| 国产精品综合二区| 制服丝袜av成人在线看| 国产精品女主播av| 久久99精品国产91久久来源| 欧美主播一区二区三区| 久久久亚洲精品一区二区三区 | 91精品国产一区二区| 中文字幕的久久| 精品在线你懂的| 欧美日韩一卡二卡三卡| 中文字幕在线一区免费| 美女一区二区在线观看| 欧日韩精品视频| 国产精品免费网站在线观看| 久久国产人妖系列| 欧美视频第二页| 自拍偷拍亚洲欧美日韩| 国产精品影视在线| 日韩天堂在线观看| 亚洲一级不卡视频| 91麻豆国产香蕉久久精品| 久久你懂得1024| 蜜乳av一区二区三区| 欧美网站大全在线观看| 亚洲天堂中文字幕| 成人影视亚洲图片在线| 欧美精品一区二区在线观看| 三级在线观看一区二区| 欧美日韩一区在线观看| 亚洲免费在线播放| 91色综合久久久久婷婷| 国产精品久久久久久亚洲毛片| 国产一区日韩二区欧美三区| 日韩欧美电影一二三| 免费久久99精品国产| 欧美高清视频www夜色资源网| 伊人色综合久久天天| 色综合婷婷久久| √…a在线天堂一区| 国产成人综合视频| 久久久精品人体av艺术| 国产乱国产乱300精品| 久久麻豆一区二区| 国产精品99久久久久久久女警| 久久综合狠狠综合久久综合88| 激情欧美一区二区| 久久人人爽爽爽人久久久| 黄色成人免费在线| 国产欧美va欧美不卡在线| 国产99精品在线观看| 国产精品少妇自拍| 一本色道久久加勒比精品 | 最好看的中文字幕久久| 99久久久久久| 亚洲综合清纯丝袜自拍| 欧美日韩精品免费| 奇米影视一区二区三区| 久久综合99re88久久爱| 丰满岳乱妇一区二区三区| 国产精品高清亚洲| 欧美亚洲综合网| 免费观看在线色综合| 久久综合给合久久狠狠狠97色69| 福利一区二区在线观看| 亚洲美女电影在线| 欧美精品三级日韩久久| 另类小说一区二区三区| 国产农村妇女毛片精品久久麻豆| 成人免费视频视频| 一区二区三区**美女毛片| 欧美日韩精品一区视频| 国产真实乱对白精彩久久| 国产情人综合久久777777| 91视频免费看| 日韩电影在线免费看| 国产欧美日韩三级| 欧美在线一二三四区| 久久精品国产**网站演员| 国产欧美日韩三级| 欧美最猛黑人xxxxx猛交| 日本不卡123| 欧美激情在线一区二区三区| 欧美伊人久久大香线蕉综合69| 免费高清在线视频一区·| 国产精品你懂的| 欧美一级视频精品观看| 高清国产一区二区| 三级成人在线视频| 国产精品国产a| 日韩一区二区三区av| 成人av资源下载| 日本不卡123| 亚洲三级在线看| 欧美一区二区国产| va亚洲va日韩不卡在线观看| 男男gaygay亚洲| 一区二区三区在线免费播放| 精品成人一区二区| 欧美色大人视频| 国产iv一区二区三区| 日本成人超碰在线观看| 亚洲天堂免费看| 国产日本欧美一区二区| 制服丝袜日韩国产| 色久优优欧美色久优优| 狠狠色丁香久久婷婷综合_中| 亚洲高清在线精品| 亚洲日本护士毛茸茸| 国产丝袜美腿一区二区三区| 欧美久久久一区|