EnumCalendarInfoExEx function

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

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

lpLocaleName

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

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.

lpReserved

Reserved; must be NULL.

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

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

   
Windows version Windows Vista [desktop apps | UWP apps] 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