VerQueryValue[A|W]
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Thu Feb 15 04:02:31 CST 2001
On Thu, Feb 15, 2001 at 01:03:28AM -0500, James Hatheway wrote:
> > I guess logically, it should be converted, but I'm still
> > trying to work out which function to use.
>
> Hi Lawson,
>
> To convert an ASCII string to Unicode, you can use the
> function HEAP_strdupAtoW, as in:
>
> wide_str = HEAP_strdupAtoW(GetProcessHeap(), 0, AsciiStr);
Please don't. Use the win32 api instead, eg:
INT len;
len = MultiByteToWideChar(CP_ACP, 0, AsciiStr, -1, NULL, 0);
wide_str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, AsciiStr, -1, wide_str, len);
....
HeapFree(GetProcessHeap(), 0, wide_str);
Huw.
--
Dr. Huw D M Davies | Clarendon Laboratory
h.davies1 at physics.ox.ac.uk | Parks Road
Tel: +44 1865 272390 | Oxford OX1 3PU
Fax: +44 1865 272400 | UK
More information about the wine-devel
mailing list