[oleaut32 1/2] Resend: Implements function
varformat:VarWeekdayName
Alexandre Julliard
julliard at winehq.org
Wed Jul 26 09:39:23 CDT 2006
"Benjamin Arai" <me at benjaminarai.com> writes:
> + str = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*size);
> + if (!str)
> + return E_OUTOFMEMORY;
> + size = GetLocaleInfoW(LOCALE_USER_DEFAULT,localeValue, str, size);
> + if (!size) {
> + ERR("GetLocaleInfo of 0x%lx failed in 2nd stage?!\n", localeValue);
> + HeapFree(GetProcessHeap(),0,str);
> + return HRESULT_FROM_WIN32(GetLastError());
> + }
> + *pbstrOut = SysAllocString(str);
You should do the GetLocaleInfoW directly into the destination string
instead of allocating another buffer.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list