lawson_whitney@juno.com writes:
AOL 5.0 does this, so I guess it is allowed by some flavors of windows.
ChangeLog:
- dlls/version/info.c:
Lawson Whitney lawson_whitney@juno.com If VerQueryValueA is called with a PE resource, cast the call to VerQueryValueW.
Shouldn't you convert the lpSubBlock string to Unicode first?
On 14 Feb 2001, Alexandre Julliard wrote:
lawson_whitney@juno.com writes:
AOL 5.0 does this, so I guess it is allowed by some flavors of windows.
ChangeLog:
- dlls/version/info.c:
Lawson Whitney lawson_whitney@juno.com If VerQueryValueA is called with a PE resource, cast the call to VerQueryValueW.
Shouldn't you convert the lpSubBlock string to Unicode first?
-- Alexandre Julliard julliard@winehq.com
Seems it is already Unicode, at least VerQueryValueW gives the app something it seems happy with. A +ver trace shows it as L"\". Is that a valid lpSubBlock for it to be querying? I guess I will study it some more.
Lawson ---cut here
________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
On 14 Feb 2001, Alexandre Julliard wrote:
Shouldn't you convert the lpSubBlock string to Unicode first?
-- Alexandre Julliard julliard@winehq.com
This particular app always passes a hex value of 5c 0 0 0. IOW, the only example I have is ambiguous, neither helped nor hurt by conversion to Unicode. I guess logically, it should be converted, but I'm still trying to work out which function to use.
Lawson ---cut here
________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
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);
Be sure to HeapFree the string after your call to the wide-char version of the API.
-James
-- James Hatheway Work: james@macadamian.com ~ http://www.macadamian.com Home: jhatheway@home.com
"Man könnte froh sein, wenn die Luft so rein wäre wie das Bier" "One could be happy if the air were as pure as the beer"
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.
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:
Oops, that will teach me to answer emails after midnight. ^_^ Of course, you are right, the Win32 API is the way to go.
HEAP_strdupAtoW is used all over the place in WINE, perhaps someday we should change them all to use the proper Win32 API?
-James -- James Hatheway Work: james@macadamian.com ~ http://www.macadamian.com Home: jhatheway@home.com
"Man könnte froh sein, wenn die Luft so rein wäre wie das Bier" "One could be happy if the air were as pure as the beer"