网站首页  词典首页

请输入您要查询的函数:

 

术语 enumresourcelanguages
释义 EnumResourceLanguages
语法:
BOOL EnumResourceLanguages( HMODULE hModule,
LPCTSTR lpType,
LPCTSTR lpName,
ENUMRESLANGPROC lpEnumFunc,
LONG_PTR lParam
);
EnumResourceLanguages功能
枚举特定语言的资源,指定的类型和名称的二进制模块相关。
参数
hModule
[in]的句柄搜索模块。在Windows Vista和更高版本,如果这是一个语言中立的移植可执行文件(文件号法律公告),然后适当的。MUI文件(如有的话)都包含在搜索。如果这是一个特定的。mui文件,该文件仅是对资源的搜索。
如果该参数为NULL,即等同于一个句柄用来创建当前进程的模块通过。
lpType
[in]指向一个空结束的字符串指定的资源类型的语言正在枚举。或者,而不是一个指针,这个参数可以MAKEINTRESOURCE(身份证),其中ID是一个整数值,代表一个预定义的资源类型。对于预定义资源类型列表,请参阅资源类型。
lpName
[in]指向一个空结束的字符串指定的资源语言而被列举的名称。或者,而不是一个指针,这个参数可以MAKEINTRESOURCE(身份证),其中ID是一个资源ID。
lpEnumFunc
[in]指向回调函数的调用,为每个枚举资源语言。有关更多信息,请参阅EnumResLangProc。
lparam的
[in]指定一个应用程序定义的传递给回调函数值。此参数可用于错误检查。
返回值
返回TRUE,如果成功,否则返回FALSE。为了获得更多错误信息,调用GetLastError。
备注
对于Windows Vista和更高版本,二进制模块通常是一个语言中立的移植可执行文件(文件号法律公告)和枚举也将包括从相应的语言资源,特定的资源文件(。MUI文件)包含本地化的语言资源。
对于每个资源发现,EnumResourceLanguages调用一个应用程序定义的回调函数lpEnumFunc,通过语言识别码(见那些资源被发现的语言,以及那些传递给EnumResourceLanguages其他各种参数语言识别码)。
或者,应用程序可以调用EnumResourceLanguagesEx,提供更精确地控制哪些资源列举。
该EnumResourceLanguages枚举函数继续,直到回调函数返回FALSE或所有的资源语言资源的语言已经列举。
在Windows Vista和更高版本,如果hModule法律公告指定一个文件,然后列举的资源可以驻留在该法律公告文件或。梅窝或与之相关的文件。如果没有。MUI文件发现,从法律公告文件只资源归还。与EnumResourceNames和EnumResourceTypes,这个搜索将着眼于多个。MUI文件。枚举开始。与EnumUILanguages相关的文件夹MUI文件。这些都是其次是任何其他。路径符合其在安置计划所述的MUI文件。MUI文件。最后,由hModule指定的文件也搜查。
枚举没有包含重复:如果具有相同的名称,类型的资源,而语言是无论是法律公告文件和一个。mui文件中,资源将只列举一次。
例如
有关示例,请参阅创建资源列表。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
资源概况,EnumResLangProc,EnumResourceLanguagesEx,EnumResourceNames,EnumResourceTypes
==英文原文==EnumResourceLanguages Function
Enumerates language-specific resources, of the specified type and name, associated with a binary module.
Syntax
BOOL EnumResourceLanguages( HMODULE hModule,
LPCTSTR lpType,
LPCTSTR lpName,
ENUMRESLANGPROC lpEnumFunc,
LONG_PTR lParam
);
Parameters
hModule
[in] The handle to a module to search. In Windows Vista and later, if this is a language-neutral Portable Executable (LN file), then appropriate .mui files (if any exist) are included in the search. If this is a specific .mui file, only that file is searched for resources.
If this parameter is NULL, that is equivalent to passing in a handle to the module used to create the current process.
lpType
[in] Pointer to a null-terminated string specifying the type of resource for which the language is being enumerated. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE (ID), where ID is an integer value representing a predefined resource type. For a list of predefined resource types, see Resource Types .
lpName
[in] Pointer to a null-terminated string specifying the name of the resource for which the language is being enumerated. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE(ID), where ID is a resource ID.
lpEnumFunc
[in] Pointer to the callback function to be called for each enumerated resource language. For more information, see EnumResLangProc .
lParam
[in] Specifies an application-defined value passed to the callback function. This parameter can be used in error checking.
Return Value
Returns TRUE if successful or FALSE otherwise. To get extended error information, call GetLastError .
Remarks
For Windows Vista and later, the binary module is typically a language-neutral Portable Executable (LN file), and the enumeration will also include resources from the corresponding language-specific resource files (.mui files) that contain localizable language resources.
For each resource found, EnumResourceLanguages calls an application-defined callback function lpEnumFunc, passing the language identifier (see Language Identifiers ) of the language for which a resource was found, as well as the various other parameters that were passed to EnumResourceLanguages.
Alternately, applications can call EnumResourceLanguagesEx , which provides more precise control of what resources are enumerated.
The EnumResourceLanguages function continues to enumerate resource languages until the callback function returns FALSE or all resource languages have been enumerated.
In Windows Vista and later, if hModule specifies an LN file, then the resources enumerated can reside either in the LN file or in an .mui file associated with it. If no .mui files are found, only resources from the LN file are returned. Unlike EnumResourceNames and EnumResourceTypes , this search will look at multiple .mui files. The enumeration begins with .mui files in the folders associated with EnumUILanguages . These are followed by any other .mui files whose paths conform to the scheme described at Placement of .mui files. Finally, the file designated by hModule is also searched.
The enumeration never includes duplicates: if a resource with the same name, type, and language is contained in both the LN file and in an .mui file, the resource will only be enumerated once.
Example
For an example, see Creating a Resource List .
Function Information
Minimum DLL Versionkernel32.dll
HeaderDeclared in Winbase.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Resources Overview , EnumResLangProc , EnumResourceLanguagesEx , EnumResourceNames , EnumResourceTypes
==原始网址==http://msdn.microsoft.com/en-us/library/ms648035(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 13:16:30