Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 4069

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csutil/win32/wintools.h File Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>csutil/win32/wintools.h File Reference</h1>Win32 tool functions. <a href="#_details">More...</a>
<p>
<code>#include &quot;csextern.h&quot;</code><br>
<code>#include &quot;<a class="el" href="csunicode_8h-source.html">csutil/csunicode.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="util_8h-source.html">csutil/util.h</a>&quot;</code><br>
<code>#include &lt;winnls.h&gt;</code><br>
<code>#include &quot;sanity.inc&quot;</code><br>

<p>
<a href="wintools_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcswinCtoA.html">cswinCtoA</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Small helper to convert an UTF-8 to an ANSI string, useful when passing arguments to a function.  <a href="structcswinCtoA.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcswinWtoA.html">cswinWtoA</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Small helper to convert a wide to an ANSI string, useful when passing arguments to a function.  <a href="structcswinWtoA.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55">cswinWindowsVersion</a> { <br>
&nbsp;&nbsp;<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df556b1d5ba8a3706a5b2a7127ba5e3e126e">cswinWin9x</a> =  30, 
<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df5554f693caa0040150e6bc66bd8a1f8db9">cswinWinNT</a> =  40, 
<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55744f8e588f03038f85fc667b8c1358bf">cswinWin2K</a> =  50, 
<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55a1e4e2fd45e72b4f065aa2f497c484a9">cswinWinXP</a> =  51, 
<br>
&nbsp;&nbsp;<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55b4c176564ddd440706db79e971eb794b">cswinWin2003</a> =  52, 
<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55c37030d948944009f0e01c9a2490b0b7">cswinWinVista</a> =  60
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Windows versions <a class="el" href="wintools_8h.html#b47782b09f200ef769700a23f9164361" title="Returns &#39;true&#39; if the current Windows is from the NT strain, &#39;false&#39;...">cswinIsWinNT()</a> can identify.  <a href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#7f0e9f222c995d12f48ddacb34b24a2b">cswinAnsiToWide</a> (const char *ansi, UINT codePage=CP_ACP)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert an ANSI string to a wide string.  <a href="#7f0e9f222c995d12f48ddacb34b24a2b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#6ca98256f702495006bae3b9ca73e25f">cswinGetErrorMessage</a> (HRESULT code)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the system's description for an error code.  <a href="#6ca98256f702495006bae3b9ca73e25f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#c368fa0a2e9eaa4d95bec024e57fe7a2">cswinGetErrorMessageW</a> (HRESULT code)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the system's description for an error code.  <a href="#c368fa0a2e9eaa4d95bec024e57fe7a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#b47782b09f200ef769700a23f9164361">cswinIsWinNT</a> (<a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55">cswinWindowsVersion</a> *version=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns 'true' if the current Windows is from the NT strain, 'false' if from the 9x strain.  <a href="#b47782b09f200ef769700a23f9164361"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wintools_8h.html#6f1d85bec42493623550c9d0247871bc">cswinWideToAnsi</a> (const <a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a> *wide, UINT codePage=CP_ACP)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a wide string to an ANSI string.  <a href="#6f1d85bec42493623550c9d0247871bc"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Win32 tool functions. 
<p>

<p>Definition in file <a class="el" href="wintools_8h-source.html">wintools.h</a>.</p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="16a1c5efc03239aecb5214b99309df55"></a><!-- doxytag: member="wintools.h::cswinWindowsVersion" ref="16a1c5efc03239aecb5214b99309df55" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55">cswinWindowsVersion</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Windows versions <a class="el" href="wintools_8h.html#b47782b09f200ef769700a23f9164361" title="Returns &#39;true&#39; if the current Windows is from the NT strain, &#39;false&#39;...">cswinIsWinNT()</a> can identify. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df556b1d5ba8a3706a5b2a7127ba5e3e126e"></a><!-- doxytag: member="cswinWin9x" ref="16a1c5efc03239aecb5214b99309df556b1d5ba8a3706a5b2a7127ba5e3e126e" args="" -->cswinWin9x</em>&nbsp;</td><td>
Windows 95/98/ME. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df5554f693caa0040150e6bc66bd8a1f8db9"></a><!-- doxytag: member="cswinWinNT" ref="16a1c5efc03239aecb5214b99309df5554f693caa0040150e6bc66bd8a1f8db9" args="" -->cswinWinNT</em>&nbsp;</td><td>
Windows NT 4.0. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df55744f8e588f03038f85fc667b8c1358bf"></a><!-- doxytag: member="cswinWin2K" ref="16a1c5efc03239aecb5214b99309df55744f8e588f03038f85fc667b8c1358bf" args="" -->cswinWin2K</em>&nbsp;</td><td>
Windows 2000. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df55a1e4e2fd45e72b4f065aa2f497c484a9"></a><!-- doxytag: member="cswinWinXP" ref="16a1c5efc03239aecb5214b99309df55a1e4e2fd45e72b4f065aa2f497c484a9" args="" -->cswinWinXP</em>&nbsp;</td><td>
Windows XP. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df55b4c176564ddd440706db79e971eb794b"></a><!-- doxytag: member="cswinWin2003" ref="16a1c5efc03239aecb5214b99309df55b4c176564ddd440706db79e971eb794b" args="" -->cswinWin2003</em>&nbsp;</td><td>
Windows Server 2003. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="16a1c5efc03239aecb5214b99309df55c37030d948944009f0e01c9a2490b0b7"></a><!-- doxytag: member="cswinWinVista" ref="16a1c5efc03239aecb5214b99309df55c37030d948944009f0e01c9a2490b0b7" args="" -->cswinWinVista</em>&nbsp;</td><td>
Windows Vista (or newer). </td></tr>
</table>
</dl>

<p>Definition at line <a class="el" href="wintools_8h-source.html#l00161">161</a> of file <a class="el" href="wintools_8h-source.html">wintools.h</a>.</p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="7f0e9f222c995d12f48ddacb34b24a2b"></a><!-- doxytag: member="wintools.h::cswinAnsiToWide" ref="7f0e9f222c995d12f48ddacb34b24a2b" args="(const char *ansi, UINT codePage=CP_ACP)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a>* cswinAnsiToWide           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ansi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT&nbsp;</td>
          <td class="paramname"> <em>codePage</em> = <code>CP_ACP</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert an ANSI string to a wide string. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Free the returned pointer with delete[]. <p>
This function provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the function and inclusion of the header file should be surrounded by appropriate '#if defined(CS_PLATFORM_WIN32) ... #endif' statements. </dd></dl>

<p>Definition at line <a class="el" href="wintools_8h-source.html#l00041">41</a> of file <a class="el" href="wintools_8h-source.html">wintools.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="6ca98256f702495006bae3b9ca73e25f"></a><!-- doxytag: member="wintools.h::cswinGetErrorMessage" ref="6ca98256f702495006bae3b9ca73e25f" args="(HRESULT code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* cswinGetErrorMessage           </td>
          <td>(</td>
          <td class="paramtype">HRESULT&nbsp;</td>
          <td class="paramname"> <em>code</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the system's description for an error code. 
<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>code</em>&nbsp;</td><td>The error code, usually retrieved through GetLastError(). </td></tr>
  </table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Returns an UTF-8 encoded string. <p>
Free the returned pointer with delete[]. <p>
This function provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the function and inclusion of the header file should be surrounded by appropriate ' '#if defined(CS_PLATFORM_WIN32) ... #endif' statements. </dd></dl>

</div>
</div><p>
<a class="anchor" name="c368fa0a2e9eaa4d95bec024e57fe7a2"></a><!-- doxytag: member="wintools.h::cswinGetErrorMessageW" ref="c368fa0a2e9eaa4d95bec024e57fe7a2" args="(HRESULT code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a>* cswinGetErrorMessageW           </td>
          <td>(</td>
          <td class="paramtype">HRESULT&nbsp;</td>
          <td class="paramname"> <em>code</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the system's description for an error code. 
<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>code</em>&nbsp;</td><td>The error code, usually retrieved through GetLastError(). </td></tr>
  </table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Free the returned pointer with delete[]. <p>
This function provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the function and inclusion of the header file should be surrounded by appropriate ' '#if defined(CS_PLATFORM_WIN32) ... #endif' statements. </dd></dl>

</div>
</div><p>
<a class="anchor" name="b47782b09f200ef769700a23f9164361"></a><!-- doxytag: member="wintools.h::cswinIsWinNT" ref="b47782b09f200ef769700a23f9164361" args="(cswinWindowsVersion *version=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cswinIsWinNT           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="wintools_8h.html#16a1c5efc03239aecb5214b99309df55">cswinWindowsVersion</a> *&nbsp;</td>
          <td class="paramname"> <em>version</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns 'true' if the current Windows is from the NT strain, 'false' if from the 9x strain. 
<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>version</em>&nbsp;</td><td>Optionally returns more specifically what Windows is used. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether the current OS is an Windows NT derivate. </dd></dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This function provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the function and inclusion of the header file should be surrounded by appropriate ' '#if defined(CS_PLATFORM_WIN32) ... #endif' statements. </dd></dl>

</div>
</div><p>
<a class="anchor" name="6f1d85bec42493623550c9d0247871bc"></a><!-- doxytag: member="wintools.h::cswinWideToAnsi" ref="6f1d85bec42493623550c9d0247871bc" args="(const wchar_t *wide, UINT codePage=CP_ACP)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static char* cswinWideToAnsi           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__util.html#g43124e776b499fd41c598b2f6d210242">wchar_t</a> *&nbsp;</td>
          <td class="paramname"> <em>wide</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT&nbsp;</td>
          <td class="paramname"> <em>codePage</em> = <code>CP_ACP</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert a wide string to an ANSI string. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Free the returned pointer with delete[]. <p>
This function provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the function and inclusion of the header file should be surrounded by appropriate ' '#if defined(CS_PLATFORM_WIN32) ... #endif' statements. </dd></dl>

<p>Definition at line <a class="el" href="wintools_8h-source.html#l00065">65</a> of file <a class="el" href="wintools_8h-source.html">wintools.h</a>.</p>

<p>Referenced by <a class="el" href="wintools_8h-source.html#l00124">cswinCtoA::cswinCtoA()</a>, and <a class="el" href="wintools_8h-source.html#l00099">cswinWtoA::cswinWtoA()</a>.</p>

</div>
</div><p>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>