Benjamin Arai wrote:
/********************************************************************** + * VarWeekdayName [OLEAUT32.128] + * + * Print the specified month as localized name. + * + * PARAMS + * iWeekday [I] day number of week 0 = sys default, 1 = Monday, etc + * fAbbrev [I] 0 - full name, !0 - abbreviated name + * iFirstDay [I] first day week, 0 = sys default, 1 = Monday, etc + * dwFlags [I] flag stuff. only VAR_CALENDAR_HIJRI possible.
s/flag stuff/flags/
+ + size = GetLocaleInfoW(LOCALE_USER_DEFAULT,localeValue, NULL, 0); + if (!size) { + FIXME("GetLocaleInfo 0x%lx failed.\n", localeValue);
This should be an ERR instead.
+ return E_INVALIDARG;
I don't think this is a good error code to return here. Even E_UNEXPECTED would be better, although perhaps HRESULT_FROM_WIN32(GetLastError()) would be the best.
+ } + str = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*size); + if (!str) + return E_OUTOFMEMORY; + size = GetLocaleInfoW(LOCALE_USER_DEFAULT,localeValue, str, size); + if (!size) { + FIXME("GetLocaleInfo of 0x%lx failed in 2nd stage?!\n", localeValue); + HeapFree(GetProcessHeap(),0,str); + return E_INVALIDARG;
Ditto for the above two comments; -- Rob Shearman