网站首页  词典首页

请输入您要查询的函数:

 

术语 enumcalendarinfo
释义 EnumCalendarInfo
语法:
BOOL EnumCalendarInfo(
__in CALINFO_ENUMPROC pCalInfoEnumProc,
__in LCID Locale,
__in CALID Calendar,
__in CALTYPE CalType
);
EnumCalendarInfo功能
枚举一个指定的区域设置日历信息。
注意:要获得除了日历日历信息识别,应用程序应该使用EnumCalendarInfoEx功能。另一个更喜欢这个功能的原因是,微软正在朝着新的,而不是区域设置的区域设置标识符迁移地区名称的使用,互操作性的原因。
注意:任何将只运行在Windows Vista和以后应优先使用EnumCalendarInfoExEx的EnumCalendarInfo应用。
参数
pCalInfoEnumProc [in]
指向一个应用程序定义的回调函数。有关更多信息,请参阅EnumCalendarInfoProc。
区域设置 [in]
区域设置标识符指定语言环境来获取日历信息。您可以使用MAKELCID宏创建一个区域设置标识符或使用下列预定义的值之一。
LOCALE_CUSTOM_DEFAULT
LOCALE_CUSTOM_UI_DEFAULT
LOCALE_CUSTOM_UNSPECIFIED
LOCALE_INVARIANT
LOCALE_SYSTEM_DEFAULT
LOCALE_USER_DEFAULT
日历 [in]
日历标识符指定其资料要求的日历。请注意,此标识符可ENUM_ALL_CALENDARS,列举所有与地区关联的日历。
CalType [in]
类型的日历信息。有关更多信息,请参见日历类型的信息。只有一个日历类型可以按次这个函数中指定的,除非另有说明。
返回值
返回一个非零值如果成功,或否则为0。为了获得更多错误信息,应用程序可以调用GetLastError函数,可以返回以下错误代码之一:
ERROR_INVALID_FLAGS。旗帜提供的值不是有效的。
ERROR_INVALID_PARAMETER。该参数值的任何无效。
备注
此功能用于枚举指定的语言环境,或为一个单一的所有适用要求的日历日历日历信息,根据日历的参数值。枚举函数通过调用指定的应用程序的日历信息定义的回调函数。它通过回调函数包含一个缓冲区所要求的日历信息的指针。这个过程一直持续到最后EnumCalendarInfo找到适用的日历或回调函数返回FALSE。
这个功能可以自定义区域设置枚举数据。数据不能保证从同一计算机到计算机之间或应用程序的运行。如果应用程序必须坚持或传输数据,请参阅使用持久性本地化数据。
当此函数的ANSI版本,是使用一个Unicode只设置标识符,函数可以成功,因为操作系统使用系统代码页。然而,在字符系统代码页未定义出现在一个字符串问号(?)。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinnls.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesEnumCalendarInfoW(Unicode)和EnumCalendarInfoA(ANSI)的
参见
国家语言支持
国家语言支持功能
日历类型信息
EnumCalendarInfoEx
EnumCalendarInfoExEx
EnumCalendarInfoProc
EnumDateFormats
MAKELCID
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月12号
==英文原文==EnumCalendarInfo Function
Enumerates calendar information for a specified locale.
Note To receive a calendar identifier in addition to calendar information, the application should use the EnumCalendarInfoEx function. Another reason for preferring this function is that Microsoft is migrating toward the use of locale names instead of locale identifiers for new locales, for interoperability reasons.
Note Any application that will be run only on Windows Vista and later should use EnumCalendarInfoExEx in preference to EnumCalendarInfo.
Syntax
BOOL EnumCalendarInfo(
__in CALINFO_ENUMPROC pCalInfoEnumProc,
__in LCID Locale,
__in CALID Calendar,
__in CALTYPE CalType
);
Parameters
pCalInfoEnumProc [in]
Pointer to an application-defined callback function. For more information, see EnumCalendarInfoProc .
Locale [in]
Locale identifier that specifies the locale for which to retrieve calendar information. You can use the MAKELCID macro to create a locale 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
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 EnumCalendarInfo 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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinnls.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesEnumCalendarInfoW (Unicode) and EnumCalendarInfoA (ANSI)
See Also
National Language Support
National Language Support Functions
Calendar Type Information
EnumCalendarInfoEx
EnumCalendarInfoExEx
EnumCalendarInfoProc
EnumDateFormats
MAKELCID
Send comments about this topic to Microsoft
Build date: 7/12/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd317803(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:29:12