Add dxdiag help message box

Henri Verbeet hverbeet at gmail.com
Thu Sep 17 06:34:02 CDT 2009


2009/9/17 Brian Nguyen <mtxcoll at gmail.com>:
> +/* Thread-safe function for converting to wide char strings at runtime */
> +LPWSTR PrintWide(LPWSTR buf, size_t len, const char *s)
> +{
> +    size_t i;
> +    for (i = 0; i < len && *s != '\0'; i++, s++) {
> +        buf[i] = *s;
> +    }
> +    return buf;
> +}
That doesn't do what you want, you should use MultiByteToWideChar() to
convert to WCHAR. However, I don't think you want to hardcode the
strings in the first place, you should load them from the resources so
they can be translated. Also, functions like that which are only used
in the current file should be static.



More information about the wine-devel mailing list