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

📄 group__etc__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pKey</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iLen</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline, static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets value from MiniGUI configuration etc object. <p>This fuctions gets the value from MiniGUi configuration etc object, somewhat similiar to GetValueFromEtcFile and GetValueFromEtc <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga5">GetValueFromEtcFile</a> <p><a class="el" href="group__etc__fns.htm#ga12">GetValueFromEtc</a>. </dd></dl><p>Definition at line <a class="el" href="minigui_8h-source.htm#l02065">2065</a> of file <a class="el" href="minigui_8h-source.htm">minigui.h</a>.<p>References <a class="el" href="group__etc__fns.htm#ga12">GetValueFromEtc()</a>, and <a class="el" href="group__etc__fns.htm#ga5">GetValueFromEtcFile()</a>.    </td>  </tr></table><a class="anchor" name="ga12" doxytag="minigui.h::GetValueFromEtc"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">GUIAPI GetValueFromEtc           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga0">GHANDLE</a>&nbsp;</td>          <td class="mdname" nowrap> <em>hEtc</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pSection</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pKey</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iLen</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets value from a configuration etc object. <p>This function gets value from an etc object, similar to GetValueFromEtcFile. This function gets the value of the key <em>pKey</em> in the section <em>pSection</em> of the etc object <em>hEtc</em>, and saves the value to the buffer pointed to by <em>pValue</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>hEtc</em>&nbsp;</td><td>Handle to the etc object. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pSection</em>&nbsp;</td><td>The section name in which the value located. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pKey</em>&nbsp;</td><td>The key name of the value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pValue</em>&nbsp;</td><td>The value will be saved in this buffer. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iLen</em>&nbsp;</td><td>The length in bytes of the buffer. This function will set value if the iLen is less than 1.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>ETC_OK on success, &lt; 0 on error.</dd></dl><dl compact><dt><b>Return values:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ETC_OK</em>&nbsp;</td><td>Gets value successfullly. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_INVALIDOBJ</em>&nbsp;</td><td>Invalid etc object. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_SECTIONNOTFOUND</em>&nbsp;</td><td>Can not find the specified section in the configuration file. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_KEYNOTFOUND</em>&nbsp;</td><td>Can not find the specified key in the section. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_READONLYOBJ</em>&nbsp;</td><td>The etc object is read-only.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga5">GetValueFromEtcFile</a>, <a class="el" href="group__etc__fns.htm#ga9">LoadEtcFile</a>, <a class="el" href="group__etc__fns.htm#ga11">UnloadEtcFile</a> </dd></dl><p>Referenced by <a class="el" href="minigui_8h-source.htm#l02065">GetMgEtcValue()</a>.    </td>  </tr></table><a class="anchor" name="ga5" doxytag="minigui.h::GetValueFromEtcFile"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">int GUIAPI GetValueFromEtcFile           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pEtcFile</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pSection</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pKey</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iLen</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets value from a configuration file. <p>This function gets the value of the key <em>pKey</em> in the section <em>pSection</em> of the configuration file <em>pEtcFile</em>, and saves the value to the buffer pointed to by <em>pValue</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pEtcFile</em>&nbsp;</td><td>The path name of the configuration file. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pSection</em>&nbsp;</td><td>The section name in which the value located. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pKey</em>&nbsp;</td><td>The key name of the value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pValue</em>&nbsp;</td><td>The value will be saved in this buffer. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iLen</em>&nbsp;</td><td>The length in bytes of the buffer.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>ETC_OK on success, &lt; 0 on error.</dd></dl><dl compact><dt><b>Return values:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ETC_OK</em>&nbsp;</td><td>Gets value successfullly. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_FILENOTFOUND</em>&nbsp;</td><td>Can not find the specified configuration file. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_SECTIONNOTFOUND</em>&nbsp;</td><td>Can not find the specified section in the configuration file. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_KEYNOTFOUND</em>&nbsp;</td><td>Can not find the specified key in the section. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_FILEIOFAILED</em>&nbsp;</td><td>File I/O operation error occurred.</td></tr>  </table></dl><dl compact><dt><b>Note:</b></dt><dd>MiniGUI use <em>strncpy</em> to copy actual value to <em>pValue</em>. Thus, if the length of the actual value is larger than <em>iLen</em>, the result copied to <em>pValue</em> will <em>NOT</em> be null-terminated.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga6">GetIntValueFromEtcFile</a>, <a class="el" href="group__etc__fns.htm#ga7">SetValueToEtcFile</a>, strncpy(3) </dd></dl><p>Referenced by <a class="el" href="minigui_8h-source.htm#l02065">GetMgEtcValue()</a>.    </td>  </tr></table><a class="anchor" name="ga15" doxytag="minigui.h::GetValueFromEtcSec"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">int GUIAPI GetValueFromEtcSec           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga0">GHANDLE</a>&nbsp;</td>          <td class="mdname" nowrap> <em>hSect</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pKey</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iLen</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets value from an etc section object. <p>This function gets value from an etc section object, similar to GetValueFromEtc. It gets the value of the key <em>pKey</em> in the section <em>hSect</em>, and saves the value to the buffer pointed to by <em>pValue</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>hSect</em>&nbsp;</td><td>The handle to the section. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pKey</em>&nbsp;</td><td>The key name of the value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pValue</em>&nbsp;</td><td>The value will be saved in this buffer. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iLen</em>&nbsp;</td><td>The length in bytes of the buffer. This function will set value if the iLen is less than 1.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>ETC_OK on success, &lt; 0 on error.</dd></dl><dl compact><dt><b>Return values:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ETC_OK</em>&nbsp;</td><td>Gets value successfullly. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_INVALIDOBJ</em>&nbsp;</td><td>Invalid etc object. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_KEYNOTFOUND</em>&nbsp;</td><td>Can not find the specified key in the section. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ETC_READONLYOBJ</em>&nbsp;</td><td>The section object is read-only.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga5">GetValueFromEtcFile</a>, <a class="el" href="group__etc__fns.htm#ga12">GetValueFromEtc</a>, <a class="el" href="group__etc__fns.htm#ga14">FindSectionInEtc</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga9" doxytag="minigui.h::LoadEtcFile"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">

⌨️ 快捷键说明

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