EnumDateFormatsW function (winnls.h)
Enumerates the long date, short date, or year/month formats that are available for a specified locale.
Syntax
BOOL EnumDateFormatsW(
[in] DATEFMT_ENUMPROCW lpDateFmtEnumProc,
[in] LCID Locale,
[in] DWORD dwFlags
);
Parameters
[in] lpDateFmtEnumProc
Pointer to an application-defined callback function. For more information, see EnumDateFormatsProc.
[in] Locale
Locale identifier that specifies the locale for which to retrieve date format information. You can use the MAKELCID macro to create an identifier or use one of the following predefined values.
- LOCALE_CUSTOM_DEFAULT
- LOCALE_CUSTOM_UI_DEFAULT
- LOCALE_CUSTOM_UNSPECIFIED
- LOCALE_INVARIANT
- LOCALE_SYSTEM_DEFAULT
- LOCALE_USER_DEFAULT
[in] dwFlags
Flag specifying date formats. For detailed definitions, see the dwFlags parameter of EnumDateFormatsExEx.
Return value
Returns a nonzero value if successful, or 0 otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
- ERROR_INVALID_FLAGS. The values supplied for flags were not valid.
- ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
Remarks
Note
The winnls.h header defines EnumDateFormats as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winnls.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |