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

📄 group__etc__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
        <tr>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga0">GHANDLE</a> GUIAPI LoadEtcFile           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>pEtcFile</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Loads an etc file into memory. <p>This function loads the content of an etc file into the memory, later, you can visit the content using <em>GetValueFromEtc</em> function.<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. If pEtcFile is NULL, the function will create an empty ETC object.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Handle of the etc object on success, NULL on error.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga11">UnloadEtcFile</a>, <a class="el" href="group__etc__fns.htm#ga12">GetValueFromEtc</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga18" doxytag="minigui.h::RemoveSectionInEtc"></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 RemoveSectionInEtc           </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"></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>Removes a section in etc object. <p>This function removes a section named <em>pSection</em> from the etc object <em>hEtc</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>The 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 pSection;</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_READONLYOBJ</em>&nbsp;</td><td>The etc object is read-only. </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 etc object.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga8">RemoveSectionInEtcFile</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga8" doxytag="minigui.h::RemoveSectionInEtcFile"></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 RemoveSectionInEtcFile           </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"></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>Removes a section in an etc file. <p>This function removes a section named <em>pSection</em> from the etc file named <em>pEtcFile</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 name of the etc file. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pSection</em>&nbsp;</td><td>The name of the pSection;</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_FILEIOFAILED</em>&nbsp;</td><td>File I/O operation error occurred. </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 etc object.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga18">RemoveSectionInEtc</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga10" doxytag="minigui.h::SaveEtcToFile"></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 SaveEtcToFile           </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>file_name</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>Saves an ETC object into a file. <p>This function saves the etc object into the file named <em>file_name</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>file_name</em>&nbsp;</td><td>The name of the target file.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>ETC_OK on success, 0 &lt; 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>Sets the etc object 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_FILEIOFAILED</em>&nbsp;</td><td>File I/O operation error occurred.</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__etc__fns.htm#ga9">LoadEtcFile</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga7" doxytag="minigui.h::SetValueToEtcFile"></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 SetValueToEtcFile           </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"></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>Sets a value in a configuration file. <p>This function sets the value of the key <em>pKey</em> in the section <em>pSection</em> of the configuration file <em>pEtcFile</em> to be the string 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 null-terminated value string.</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>Sets value successfullly. </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_TMPFILEFAILED</em>&nbsp;</td><td>Can not create temporary file.</td></tr>  </table></dl><dl compact><dt><b>Note:</b></dt><dd>If the specified configuration file does not exist, MiniGUI will try to create this file.</dd></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#ga6">GetIntValueFromEtcFile</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga17" doxytag="minigui.h::SetValueToEtcSec"></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 SetValueToEtcSec           </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>

⌨️ 快捷键说明

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