网站首页  词典首页

请输入您要查询的函数:

 

术语 enumresourcetypes
释义 EnumResourceTypes
语法:
BOOL EnumResourceTypes( HMODULE hModule,
ENUMRESTYPEPROC lpEnumFunc,
LONG_PTR lParam
);
EnumResourceTypes功能
在二进制模块枚举资源类型。对于Windows Vista和更高版本,这通常是一个语言中立的移植可执行文件(文件号法律公告)和枚举还包括从一个相应的语言特定的资源文件(。MUI文件),如果存在,包含本地化的语言资源资源。它也可以使用hModule指定。mui文件,在这种情况下只有这个文件中查找资源类型。
对于每个资源类型中,EnumResourceTypes调用一个应用程序定义的回调函数lpEnumFunc,传递每找到资源类型,以及所通过的EnumResourceTypes其他各种参数。
或者,应用程序可以调用EnumResourceTypesEx,它提供了更精确的控制权资源文件来枚举。
参数
hModule
[in]句柄搜索模块。在Windows Vista和更高版本,如果这是一个法律公告文件,然后适当的。MUI文件(如有的话)都包含在搜索。这种处理必须通过LoadLibrary或LoadLibraryEx获得。
如果该参数为NULL,即等同于一个句柄用来创建当前进程的模块通过。
lpEnumFunc
[in]指向回调函数的调用,为每个枚举资源类型。有关详细信息,请参阅EnumResTypeProc功能。
lparam的
[in]指定一个应用程序定义的传递给回调函数值。
返回值
如果成功返回TRUE,否则返回FALSE。为了获得更多错误信息,调用GetLastError。
备注
EnumResourceTypes继续枚举到回调函数返回FALSE或所有的资源类型的资源类型被列举。
在Windows Vista和更高版本,如果hModule法律公告指定一个文件,然后枚举类型对应于资源居住在法律公告文件和一个。mui文件与之相关联。如果没有。MUI文件发现,从法律公告文件类别,只是返回。的顺序。MUI文件的搜索是通常的资源装载机搜索顺序,详情可参见用户界面语言管理。一旦一个适当的。mui文件的搜索,发现不继续至其他。梅窝与法律公告文件关联的文件,因为所有的。MUI文件对应于一个单一的文件具有法律公告的资源类型相同。
枚举没有包含重复:如果给定的资源类型无论是法律公告文件和一个。mui文件中,枚举类型只有一次。
例如
有关示例,请参阅创建资源列表。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
资源概况,EnumResourceTypesEx,EnumResourceLanguages,EnumResourceNames,EnumResTypeProc
==英文原文==EnumResourceTypes Function
Enumerates resource types within a binary module. For Windows Vista and later, this is typically a language-neutral Portable Executable (LN file), and the enumeration also includes resources from one of the corresponding language-specific resource files (.mui files)—if one exists—that contain localizable language resources. It is also possible to use hModule to specify a .mui file, in which case only that file is searched for resource types.
For each resource type found, EnumResourceTypes calls an application-defined callback function lpEnumFunc, passing each resource type it finds, as well as the various other parameters that were passed to EnumResourceTypes.
Alternately, applications can call EnumResourceTypesEx , which provides more precise control over which resource files to enumerate.
Syntax
BOOL EnumResourceTypes( HMODULE hModule,
ENUMRESTYPEPROC lpEnumFunc,
LONG_PTR lParam
);
Parameters
hModule
[in] Handle to a module to search. In Windows Vista and later, if this is an LN file, then appropriate .mui files (if any exist) are included in the search. This handle must be obtained through LoadLibrary or LoadLibraryEx .
If this parameter is NULL, that is equivalent to passing in a handle to the module used to create the current process.
lpEnumFunc
[in] Pointer to the callback function to be called for each enumerated resource type. For more information, see the EnumResTypeProc function.
lParam
[in] Specifies an application-defined value passed to the callback function.
Return Value
Returns TRUE if successful; otherwise, FALSE. To get extended error information, call GetLastError .
Remarks
EnumResourceTypes continues to enumerate resource types until the callback function returns FALSE or all resource types have been enumerated.
In Windows Vista and later, if hModule specifies an LN file, then the types enumerated correspond to resources that reside in the LN file and in an .mui file associated with it. If no .mui files are found, only types from the LN file are returned. The order in which .mui files are searched is the usual Resource Loader search order; see User Interface Language Management for details. Once one appropriate .mui file is found the search does not continue further to other .mui files associated with the LN file, because all .mui files that correspond to a single LN file have the same set of resource types.
The enumeration never includes duplicates: if a given resource type is contained in both the LN file and in an .mui file, the type is enumerated only 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 , EnumResourceTypesEx , EnumResourceLanguages , EnumResourceNames , EnumResTypeProc
==原始网址==http://msdn.microsoft.com/en-us/library/ms648039(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:22:34