diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 958c6a7c8f7..c324347f0e8 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -401,7 +401,7 @@ @ stdcall EnumCalendarInfoW(ptr long long long) @ stdcall EnumDateFormatsA(ptr long long) @ stdcall EnumDateFormatsExA(ptr long long) -# @ stub EnumDateFormatsExEx +@ stdcall EnumDateFormatsExEx(ptr wstr long long) @ stdcall EnumDateFormatsExW(ptr long long) @ stdcall EnumDateFormatsW(ptr long long) @ stdcall EnumLanguageGroupLocalesA(ptr long long ptr) diff --git a/dlls/kernel32/lcformat.c b/dlls/kernel32/lcformat.c index 8f088264f52..48adb119c98 100644 --- a/dlls/kernel32/lcformat.c +++ b/dlls/kernel32/lcformat.c @@ -1753,10 +1753,12 @@ struct enumdateformats_context { union { DATEFMT_ENUMPROCW callback; /* user callback pointer */ DATEFMT_ENUMPROCEXW callbackex; + DATEFMT_ENUMPROCEXEX callbackexex; } u; - LCID lcid; /* locale of interest */ - DWORD flags; - BOOL unicode; /* A vs W callback type, only for regular and Ex callbacks */ + LCID lcid; /* locale of interest */ + DWORD flags; + LPARAM lParam; + BOOL unicode; /* A vs W callback type, only for regular and Ex callbacks */ }; /****************************************************************************** @@ -1821,6 +1823,9 @@ static BOOL NLS_EnumDateFormats(const struct enumdateformats_context *ctxt) case CALLBACK_ENUMPROCEX: ctxt->u.callbackex(ctxt->unicode ? bufW : (WCHAR*)bufA, cal_id); break; + case CALLBACK_ENUMPROCEXEX: + ctxt->u.callbackexex(bufW, cal_id, ctxt->lParam); + break; default: ; } @@ -1899,6 +1904,22 @@ BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW proc, LCID lcid, DWORD flags) return NLS_EnumDateFormats(&ctxt); } +/************************************************************************** + * EnumDateFormatsExEx (KERNEL32.@) + */ +BOOL WINAPI EnumDateFormatsExEx(DATEFMT_ENUMPROCEXEX proc, const WCHAR *locale, DWORD flags, LPARAM lParam) +{ + struct enumdateformats_context ctxt; + + ctxt.type = CALLBACK_ENUMPROCEXEX; + ctxt.u.callbackexex = proc; + ctxt.lcid = LocaleNameToLCID(locale, 0); + ctxt.flags = flags; + ctxt.lParam = lParam; + + return NLS_EnumDateFormats(&ctxt); +} + /************************************************************************** * EnumTimeFormatsA (KERNEL32.@) * diff --git a/include/winnls.h b/include/winnls.h index 0f68c8165bc..2f899f83029 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -734,6 +734,7 @@ typedef struct _nlsversioninfoex { /* Define a bunch of callback types */ typedef BOOL (CALLBACK *CALINFO_ENUMPROCEXEX)(LPWSTR,CALID,LPWSTR,LPARAM); +typedef BOOL (CALLBACK *DATEFMT_ENUMPROCEXEX)(LPWSTR,CALID,LPARAM); #if defined(STRICT) typedef BOOL (CALLBACK *CALINFO_ENUMPROCA)(LPSTR); typedef BOOL (CALLBACK *CALINFO_ENUMPROCW)(LPWSTR); @@ -843,6 +844,7 @@ WINBASEAPI BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD); WINBASEAPI BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA,LCID,DWORD); WINBASEAPI BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW,LCID,DWORD); #define EnumDateFormatsEx WINELIB_NAME_AW(EnumDateFormatsEx) +WINBASEAPI BOOL WINAPI EnumDateFormatsExEx(DATEFMT_ENUMPROCEXEX,LPCWSTR,DWORD,LPARAM); WINBASEAPI BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD); WINBASEAPI BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD); #define EnumSystemCodePages WINELIB_NAME_AW(EnumSystemCodePages)