Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- Alternatively, we could keep using GetLocaleInfoW here and divide sizeof(reading_layout) by sizeof(WCHAR). --- dlls/comctl32/tests/propsheet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index b4696112500..4621d2c8c38 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -56,7 +56,7 @@ static HTHEME (WINAPI *pOpenThemeData)(HWND, LPCWSTR); static void detect_locale(void) { DWORD reading_layout; - rtl = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IREADINGLAYOUT | LOCALE_RETURN_NUMBER, + rtl = GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_IREADINGLAYOUT | LOCALE_RETURN_NUMBER, (void *)&reading_layout, sizeof(reading_layout)) && reading_layout == 1; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=104500
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
comctl32: propsheet.c:96: Test failed: Unexpected template buffer size 508, resource size 270 propsheet.c:96: Test failed: Unexpected template buffer size 508, resource size 270 propsheet.c:96: Test failed: Unexpected template buffer size 508, resource size 270
I thought for RETURN_NUMBER, A vs W work the same. Is that not the case?
On Sun, Dec 26, 2021 at 10:51 PM Nikolay Sivov nsivov@codeweavers.com wrote:
I thought for RETURN_NUMBER, A vs W work the same. Is that not the case?
MSDN says [1]:
[in] cchData
Size, in TCHAR values, of the data buffer indicated by lpLCData.
Return value
Returns the number of characters retrieved in the locale data buffer if successful and cchData is a nonzero value. If the function succeeds, cchData is nonzero, and LOCALE_RETURN_NUMBER is specified, the return value is the size of the integer retrieved in the data buffer; that is, 2 for the Unicode version of the function or 4 for the ANSI version.
And a quick test shows that the call to GetLocaleInfoW succeeds with cchData=2 on both Windows and Wine, but GetLocaleInfoA with cchData=2 fails on both Windows and Wine.
-Alex
[1] https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getlocal...