Expand Minimize

EnumCalendarInfoEx function

Enumerates calendar information for a locale specified by identifier.

Note  Any application that runs only on Windows Vista and later should use EnumCalendarInfoExEx in preference to this function.

Syntax


BOOL EnumCalendarInfoEx(
  _In_  CALINFO_ENUMPROCEX pCalInfoEnumProcEx,
  _In_  LCID Locale,
  _In_  CALID Calendar,
  _In_  CALTYPE CalType
);

Parameters

pCalInfoEnumProcEx [in]

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

Locale [in]

Locale identifier that specifies the locale for which to retrieve calendar information. You can use the MAKELCID macro to create an identifier or use one of the following predefined values.

Windows Vista and later: The following custom locale identifiers are also supported.

Calendar [in]

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.

CalType [in]

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.

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. This process continues until EnumCalendarInfoEx finds the last applicable calendar or the callback function returns FALSE.

This function can enumerate data from custom locales. Data is not guaranteed to be the same from computer to computer or between runs of an application. If your application must persist or transmit data, see Using Persistent Locale Data.

When the ANSI version of this function is used with a Unicode-only locale identifier, the function can succeed because the operating system uses the system code page. However, characters that are undefined in the system code page appear in the string as a question mark (?).

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winnls.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

EnumCalendarInfoExW (Unicode) and EnumCalendarInfoExA (ANSI)

See also

National Language Support
National Language Support Functions
Calendar Type Information
EnumCalendarInfo
EnumCalendarInfoExEx
EnumCalendarInfoProcEx
EnumDateFormats

 

 

Community Additions

ADD
Show:
© 2014 Microsoft