网站首页  词典首页

请输入您要查询的函数:

 

术语 getthreadpreferreduilanguages
释义 GetThreadPreferredUILanguages
语法:
BOOL GetThreadPreferredUILanguages(
__in DWORD dwFlags,
__out PULONG pulNumLanguages,
__out_opt PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer
);
GetThreadPreferredUILanguages功能
获取线程的首选当前线程的UI语言。有关更多信息,请参阅用户界面语言管理。
参数
dwFlags [in]
标志识别的语言格式和过滤。以下标志指定的语言格式使用线程的首选UI语言。这些标志是互相排斥的,并且默认是MUI_LANGUAGE_NAME。
ValueMeaning
MUI_LANGUAGE_IDRetrieve的语言标识符格式的语言字符串。
MUI_LANGUAGE_NAMERetrieve在语言名称格式语言的字符串。
以下标志指定的函数中使用过滤检索线程的首选UI语言。默认标志MUI_MERGE_USER_FALLBACK。
ValueMeaning
MUI_MERGE_SYSTEM_FALLBACKUse系统后备检索列表,完全符合的语言清单,资源加载器使用。这个标志只能用于与MUI_MERGE_USER_FALLBACK组合。结合使用的旗帜改变,包括在清单中回落,中立语文MUI_MERGE_USER_FALLBACK通常的效果。
MUI_MERGE_USER_FALLBACKRetrieve综合列表界面线程的首选语言,其次是过程的首选UI语言,其次是任何用户的首选UI语言是从这些不同,由系统默认的UI语言之后,如果不在列表中已经组成。如果用户的首选UI语言列表是空的,该函数检索系统的首选UI语言。这标志不能结合MUI_THREAD_LANGUAGES。
MUI_THREAD_LANGUAGESRetrieve只有线程的首选UI语言为当前线程,或者一个空列表,如果没有的首选语言是为当前线程设置。这标志不能结合MUI_MERGE_USER_FALLBACK或MUI_MERGE_SYSTEM_FALLBACK。
MUI_UI_FALLBACKRetrieve一个完整的线程优先以及相关后备和中立的语言用户界面语言列表。此标志的使用相当于结合MUI_MERGE_SYSTEM_FALLBACK和MUI_MERGE_USER_FALLBACK。 (仅适用于Windows 7和更高版本)。
pulNumLanguages [out]
指针在pwszLanguagesBuffer检索语言的数量。
pwszLanguagesBuffer [指出,可选]
可选。缓冲区指针在本函数检索一个有序,空分隔线程的首选UI语言的清单由dwFlags指定的格式。此列表结尾两个空字符。
或者,如果该参数设置为null和pcchLanguagesBuffer设置为0,函数检索在pcchLanguagesBuffer语言缓冲区所需的大小。所需的大小,包括两间空字符。
pcchLanguagesBuffer [ in , out ]
指针的大小,以字符为缓冲区的语言所指出的pwszLanguagesBuffer。在从函数成功返回,参数包含检索语言的缓冲区大小。
或者,如果此参数设置为0,pwszLanguagesBuffer设置为null,函数检索在pcchLanguagesBuffer语言缓冲区所需的大小。
返回值
返回TRUE,如果成功,否则返回FALSE。为了获得更多错误信息,应用程序可以调用GetLastError函数,它返回下面的错误代码之一:
ERROR_INSUFFICIENT_BUFFER。阿提供的缓冲区大小不够大,或者被错误地设置为NULL。
如果该函数的任何其他原因而失败,参数pulNumLanguages和pcchLanguagesBuffer是不确定的。
备注
根据由应用程序指定的标志,此功能可检索的综合列表界面线程的首选语言,进程的首选UI语言,用户界面的首选语言或系统的首选UI语言组成,系统默认的UI语言。如果遇到一个重复的语言,函数只检索第一语言。
如果应用程序调用的MUI_CONSOLE_FILTER或MUI_COMPLEX_SCRIPT_FILTER旗SetThreadPreferredUILanguages,GetThreadPreferredUILanguages过滤器在结果列表中的语言。函数替换语言的控制台不能显示与替代语言。对于语言替代确定从LOCALE_SCONSOLEFALLBACKNAME的语言值。欲了解更多信息控制台,看到SetThreadUILanguage描述。
对MUI_LANGUAGE_NAME的使用提出了超过MUI_LANGUAGE_ID因为MUI_LANGUAGE_NAME旗可以做处理语言界面包(LIP)的语言相对应的补充语言环境更好的工作。
如果应用程序设置MUI_LANGUAGE_ID标志,线程的首选UI语言可以包含一个或多个语言区域设置相对应的补充。在从函数成功返回,语言缓冲区包含“1400”的任何语言的补充相应的语言环境。只能有一个在此列表中的语言。字符串“1400”对应LOCALE_CUSTOM_UI_DEFAULT十六进制值。还成功地从函数返回的pwszLanguagesBuffer包含“1000”的任何其他语言对应的补充区域。字符串“1000”对应LOCALE_CUSTOM_UNSPECIFIED,这不是作为任何函数的输入有用的,因为它不能区分补充区域设置的十六进制值。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinnls.h(头文件:winuser.h)
LibraryKernel32.lib
参见
多语言用户界面
多语言用户界面功能
GetThreadUILanguage
SetThreadPreferredUILanguages
SetThreadUILanguage
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月12号
==英文原文==GetThreadPreferredUILanguages Function
Retrieves the thread preferred UI languages for the current thread. For more information, see User Interface Language Management .
Syntax
BOOL GetThreadPreferredUILanguages(
__in DWORD dwFlags,
__out PULONG pulNumLanguages,
__out_opt PZZWSTR pwszLanguagesBuffer,
__inout PULONG pcchLanguagesBuffer
);
Parameters
dwFlags [in]
Flags identifying language format and filtering. The following flags specify the language format to use for the thread preferred UI languages. The flags are mutually exclusive, and the default is MUI_LANGUAGE_NAME.
ValueMeaning
MUI_LANGUAGE_IDRetrieve the language strings in language identifier format.
MUI_LANGUAGE_NAMERetrieve the language strings in language name format.

The following flags specify filtering for the function to use in retrieving the thread preferred UI languages. The default flag is MUI_MERGE_USER_FALLBACK.
ValueMeaning
MUI_MERGE_SYSTEM_FALLBACKUse the system fallback to retrieve a list that corresponds exactly to the language list used by the resource loader. This flag can be used only in combination with MUI_MERGE_USER_FALLBACK. Using the flags in combination alters the usual effect of MUI_MERGE_USER_FALLBACK by including fallback and neutral languages in the list.
MUI_MERGE_USER_FALLBACKRetrieve a composite list consisting of the thread preferred UI languages, followed by process preferred UI languages, followed by any user preferred UI languages that are distinct from these, followed by the system default UI language, if it is not already in the list. If the user preferred UI languages list is empty, the function retrieves the system preferred UI languages. This flag cannot be combined with MUI_THREAD_LANGUAGES.
MUI_THREAD_LANGUAGESRetrieve only the thread preferred UI languages for the current thread, or an empty list if no preferred languages are set for the current thread. This flag cannot be combined with MUI_MERGE_USER_FALLBACK or MUI_MERGE_SYSTEM_FALLBACK.
MUI_UI_FALLBACKRetrieve a complete thread preferred UI languages list along with associated fallback and neutral languages. Use of this flag is equivalent to combining MUI_MERGE_SYSTEM_FALLBACK and MUI_MERGE_USER_FALLBACK. (Applicable only for Windows 7 and later).

pulNumLanguages [out]
Pointer to the number of languages retrieved in pwszLanguagesBuffer.
pwszLanguagesBuffer [out, optional]
Optional. Pointer to a buffer in which this function retrieves an ordered, null-delimited thread preferred UI languages list, in the format specified by dwFlags. This list ends with two null characters.
Alternatively if this parameter is set to null and pcchLanguagesBuffer is set to 0, the function retrieves the required size of the language buffer in pcchLanguagesBuffer. The required size includes the two null characters.
pcchLanguagesBuffer [in, out]
Pointer to the size, in characters, for the language buffer indicated by pwszLanguagesBuffer. On successful return from the function, the parameter contains the size of the retrieved language buffer.
Alternatively if this parameter is set to 0 and pwszLanguagesBuffer is set to null, the function retrieves the required size of the language buffer in pcchLanguagesBuffer.
Return Value
Returns TRUE if successful or FALSE otherwise. To get extended error information, the application can call GetLastError , which returns one of the following error codes:
ERROR_INSUFFICIENT_BUFFER. A supplied buffer size was not large enough, or it was incorrectly set to NULL.
If the function fails for any other reason, the parameters pulNumLanguages and pcchLanguagesBuffer are undefined.
Remarks
Depending on the flags specified by the application, this function can retrieve a composite list consisting of the thread preferred UI languages, process preferred UI languages, user preferred UI languages or system preferred UI languages, and the system default UI language. If it encounters a duplicate language, the function only retrieves the first language.
If the application has called SetThreadPreferredUILanguages with the MUI_CONSOLE_FILTER or MUI_COMPLEX_SCRIPT_FILTER flag, GetThreadPreferredUILanguages filters the languages in the result list. The function replaces the languages the console cannot display with a substitute language. The substitution for a language is determined from the value of LOCALE_SCONSOLEFALLBACKNAME for the language. For more console information, see the description of SetThreadUILanguage .
Use of MUI_LANGUAGE_NAME is recommended over MUI_LANGUAGE_ID because the MUI_LANGUAGE_NAME flag can do a better job of handling Language Interface Pack (LIP) languages that correspond to supplemental locales .
If the application sets the MUI_LANGUAGE_ID flag, the thread preferred UI languages can include one or more languages that correspond to supplemental locales. On successful return from the function, the language buffer contains "1400" for any language corresponding to a supplemental locale. There can be only one such language in this list. The string "1400" corresponds to the hexadecimal value of LOCALE_CUSTOM_UI_DEFAULT . Also on successful return from the function, the pwszLanguagesBuffer contains "1000" for any other language that corresponds to a supplemental locale. The string "1000" corresponds to the hexadecimal value of LOCALE_CUSTOM_UNSPECIFIED , which is not useful as an input to any function, because it cannot distinguish among supplemental locales.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinnls.h (include Windows.h)
LibraryKernel32.lib
See Also
Multilingual User Interface
Multilingual User Interface Functions
GetThreadUILanguage
SetThreadPreferredUILanguages
SetThreadUILanguage
Send comments about this topic to Microsoft
Build date: 7/12/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd318128(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:22:29