EnumCalendarInfoExEx

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(
         CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx,
         LPCWSTR lpLocaleName,
         CALID Calendar,
         LPCWSTR lpReserved,
         CALTYPE CalType,
         LPARAM lParam
)  

Parameters

pCalInfoEnumProcExEx
Type: CALINFO_ENUMPROCEXEX 

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

lpLocaleName
Type: LPCWSTR 

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

Calendar
Type: CALID 

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.

lpReserved
Type: LPCWSTR 

Reserved; must be NULL.

CalType
Type: 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.

lParam
Type: LPARAM 

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

Return value

Type: BOOL 

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:

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

Header: Declared in winnls.h.

Library: Use kernelx.lib.