<span>Hm, okay. I just wanted to test the waters here; I'll rework this to use a function that loads<br>a string from a resource file. Does the help message itself look okay? I just used the message<br>provided by the native dxdiag app, but I could rework it if there are issues with copyright or<br>
wine conventions.<br><br>On Thu, Sep 17, 2009 at 6:34 AM, Henri Verbeet <</span><a href="http://www.nabble.com/user/SendEmail.jtp?type=post&post=25500104&i=0" target="_top" rel="nofollow"><span>hverbeet@...</span></a><span>> wrote:
</span><div style="height: auto; overflow-y: auto;" class="shrinkable-quote"><br><span>> 2009/9/17 Brian Nguyen <</span><a href="http://www.nabble.com/user/SendEmail.jtp?type=post&post=25500104&i=1" target="_top" rel="nofollow"><span><b class="highlight">mtxcoll</b>@...</span></a><span>>:
</span><br><span>>> +/* Thread-safe function for converting to wide char strings at runtime */
</span><br><span>>> +LPWSTR PrintWide(LPWSTR buf, size_t len, const char *s)
</span><br><span>>> +{
</span><br><span>>> + � �size_t i;
</span><br><span>>> + � �for (i = 0; i < len && *s != '\0'; i++, s++) {
</span><br><span>>> + � � � �buf[i] = *s;
</span><br><span>>> + � �}
</span><br><span>>> + � �return buf;
</span><br><span>>> +}
</span><br><span>> That doesn't do what you want, you should use MultiByteToWideChar() to
</span><br><span>> convert to WCHAR. However, I don't think you want to hardcode the
</span><br><span>> strings in the first place, you should load them from the resources so
</span><br><span>> they can be translated. Also, functions like that which are only used
</span><br><span>> in the current file should be static.
</span></div><br><span>Thanks for taking this on!
</span><br><br><span>--
</span><br><span>-Austin
</span><br clear="all"><br>-- <br>Brian Nguyen<br><a href="mailto:mtxcoll@gmail.com">mtxcoll@gmail.com</a><br>