EnumCalendarInfoExEx function (winnls.h)

Enumerates calendar information for a locale specified by name.

Note  The application should call this function in preference to EnumCalendarInfo or EnumCalendarInfoEx if designed to run only on Windows Vista and later.

 
Note  This function can enumerate data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data.
 

Syntax

BOOL EnumCalendarInfoExEx(
  [in]           CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx,
  [in, optional] LPCWSTR              lpLocaleName,
  [in]           CALID                Calendar,
  [in, optional] LPCWSTR              lpReserved,
  [in]           CALTYPE              CalType,
  [in]           LPARAM               lParam
);

Parameters

[in] pCalInfoEnumProcExEx

Pointer to an application-defined callback function. For more information, see EnumCalendarInfoProcExEx.

[in, optional] lpLocaleName

Pointer to a locale name, or one of the following predefined values.

[in] Calendar

Calendar identifier that specifies the calendar for which information is requested. Note that this identifier can be ENUM_ALL_CALENDARS, to enumerate all calendars that are associated with the locale.

[in, optional] lpReserved

Reserved; must be NULL.

[in] CalType

Type of calendar information. For more information, see Calendar Type Information. Only one calendar type can be specified per call to this function, except where noted.

[in] lParam

Application-provided parameter to pass to the callback function. This value is especially useful for multi-threaded applications.

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

This function enumerates calendar information for all applicable calendars for the specified locale, or for a single requested calendar, depending on the value of the Calendar parameter. The function enumerates the calendar information by calling the specified application-defined callback function. It passes the callback function a pointer to a buffer containing the requested calendar information, a calendar identifier, and an application-defined parameter that is useful for multi-threaded applications. This process continues until EnumCalendarInfoExEx finds the last applicable calendar or the callback function returns FALSE.

Beginning in Windows 8: If your app passes language tags to this function from the Windows.Globalization namespace, it must first convert the tags by calling ResolveLocaleName.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header winnls.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

Calendar Type Information

EnumCalendarInfo

EnumCalendarInfoEx

EnumCalendarInfoProcExEx

EnumDateFormatsExEx

National Language Support

National Language Support Functions