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

📄 group__etc__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Finds/Creates a section from an etc object. <p>This function look for a section named <em>pSection</em> from the etc object <em>hEtc</em>. If there is no such section in the etc object and <em>bCreateNew</em> is TRUE, the function will create an empty section.<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 name of the section. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>bCreateNew</em>&nbsp;</td><td>Indicate whether to create a new section.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the section, 0 if not found or creatation failed.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga15">GetValueFromEtcSec</a>, <a class="el" href="group__etc__fns.htm#ga16">GetIntValueFromEtcSec</a>, SetValueInEtcSec </dd></dl>    </td>  </tr></table><a class="anchor" name="ga13" doxytag="minigui.h::GetIntValueFromEtc"></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 GetIntValueFromEtc           </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>int *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</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 the integer value from a configuration etc object. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga12">GetValueFromEtc</a>, <a class="el" href="group__etc__fns.htm#ga6">GetIntValueFromEtcFile</a> </dd></dl><p>Referenced by <a class="el" href="minigui_8h-source.htm#l02085">GetMgEtcIntValue()</a>.    </td>  </tr></table><a class="anchor" name="ga6" doxytag="minigui.h::GetIntValueFromEtcFile"></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 GetIntValueFromEtcFile           </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>int *&nbsp;</td>          <td class="mdname" nowrap> <em>value</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 integer value from a configuration file. <p>This function gets the integer value of the key <em>pKey</em> in the section <em>pSection</em> of the configuration file <em>pEtcFile</em>, and returns the integer value through the buffer pointed to by <em>value</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>value</em>&nbsp;</td><td>The integer value will be saved in this 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>    <tr><td valign="top"></td><td valign="top"><em>ETC_INTCONV</em>&nbsp;</td><td>Can not convert the value string to an integer.</td></tr>  </table></dl><dl compact><dt><b>Note:</b></dt><dd>MiniGUI uses <em>strtol</em> to convert the string value to an integer, and pass the base as 0. Thus, the valid string value can be converted to integer should be in the following forms:</dd></dl><ul><li>[+|-]0x[0-9|A-F]*<br> Will be read in base 16.</li><li>[+|-]0[0-7]*<br> Will be read in base 8.</li><li>[+|-][1-9][0-9]*<br> Will be read in base 10.</li></ul><p><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#ga7">SetValueToEtcFile</a>, strtol(3) </dd></dl><p>Referenced by <a class="el" href="minigui_8h-source.htm#l02085">GetMgEtcIntValue()</a>.    </td>  </tr></table><a class="anchor" name="ga16" doxytag="minigui.h::GetIntValueFromEtcSec"></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 GetIntValueFromEtcSec           </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>int *&nbsp;</td>          <td class="mdname" nowrap> <em>pValue</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 an integer value from an etc section object. <p>This function gets an integer value from an etc section object, similar to GetIntValueFromEtc. 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>  </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_INTCONV</em>&nbsp;</td><td>Can not convert the value string to an integer.</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="ga20" doxytag="minigui.h::GetMgEtcIntValue"></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">static inline int GetMgEtcIntValue           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">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>int *&nbsp;</td>          <td class="mdname" nowrap> <em>value</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 integer value from MiniGUI configuration etc object. <p>This fuctions get integer value from MiniGUI configuration etc object some what similiar to GetIntValueFromEtcFile and GetIntValueFromEtc <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga6">GetIntValueFromEtcFile</a> <p><a class="el" href="group__etc__fns.htm#ga13">GetIntValueFromEtc</a> </dd></dl><p>Definition at line <a class="el" href="minigui_8h-source.htm#l02085">2085</a> of file <a class="el" href="minigui_8h-source.htm">minigui.h</a>.<p>References <a class="el" href="group__etc__fns.htm#ga13">GetIntValueFromEtc()</a>, and <a class="el" href="group__etc__fns.htm#ga6">GetIntValueFromEtcFile()</a>.    </td>  </tr></table><a class="anchor" name="ga19" doxytag="minigui.h::GetMgEtcValue"></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">static inline int GetMgEtcValue           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap> <em>pSection</em>, </td>

⌨️ 快捷键说明

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