网站首页  词典首页

请输入您要查询的函数:

 

术语 enumresourcenames
释义 EnumResourceNames
语法:
BOOL EnumResourceNames( HMODULE hModule,
LPCTSTR lpszType,
ENUMRESNAMEPROC lpEnumFunc,
LONG_PTR lParam
);
EnumResourceNames功能
指定类型的枚举资源在一个二进制模块。对于Windows Vista和更高版本,这通常是一个语言中立的移植可执行文件(文件号法律公告)和枚举也将包括从相应的语言资源,特定的资源文件(。MUI文件)包含本地化的语言资源。它也可能hModule指定一个。mui文件,在这种情况下只有这个文件中查找资源。
参数
hModule
[in]句柄搜索模块。在Windows Vista和更高版本,如果这是一个法律公告文件,然后适当的。MUI文件(如有的话)都包含在搜索。
如果该参数为NULL,即等同于一个句柄用来创建当前进程的模块通过。
lpszType
[in]指向一个空结束的字符串指定的资源的名称是被枚举类型。或者,而不是一个指针,这个参数可以MAKEINTRESOURCE(身份证),其中ID是一个整数值,代表一个预定义的资源类型。对于预定义资源类型列表,请参阅资源类型。
lpEnumFunc
[in]指向回调函数的调用,为每个枚举资源名称或ID。有关更多信息,请参阅EnumResNameProc。
lparam的
[in]指定一个应用程序定义的传递给回调函数值。此参数可用于错误检查。
返回值
返回TRUE,如果函数调用成功或FALSE,如果该函数没有找到指定的类型,或者如果函数的另一个原因失败资源。为了获得更多错误信息,调用GetLastError。
GetLastError函数值
NO_ERRORWindows 95/98:没有指定类型的资源被发现。
ERROR_RESOURCE_TYPE_NOT_FOUNDWindows NT/2000/XP的:没有指定类型的资源被发现。
任何其他返回valueSome其他类型的错误发生。
备注
对于每个资源发现,EnumResourceNames调用一个应用程序定义的回调函数lpEnumFunc,传递的名称或找到的每个资源,以及所通过的EnumResourceNames其他各种参数的ID。
或者,应用程序可以调用EnumResourceNamesEx,提供更精确地控制哪些资源列举。
如果资源有一个ID,该ID是传递给回调函数,否则资源名称传递给回调函数。有关更多信息,请参阅EnumResNameProc。
该EnumResourceNames函数继续,直到枚举回调函数返回FALSE或所有资源资源被列举。
In Windows Vista and later, if hModule specifies an LN file, then the resources enumerated can reside either in the LN file or in a .mui file associated with it.如果没有。MUI文件发现,从法律公告文件只资源归还。的顺序。MUI文件的搜索是通常的资源装载机搜索顺序,详情可参见用户界面语言管理。一旦一个适当的。mui文件被找到,。mui文件搜索停止。 Because all .mui files that correspond to a single LN file have the same resource types, only the resources in the found .mui file need to be enumerated.
枚举没有包含重复的:如果具有相同名称的资源,无论是法律公告文件和一个。mui文件中,资源将只列举一次。
例如
有关示例,请参阅创建资源列表。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
资源概况,EnumResourceNamesEx,EnumResNameProc,EnumResourceLanguages,EnumResourceTypes
==英文原文==EnumResourceNames Function
Enumerates resources of a specified type within a binary module. For Windows Vista and later, this 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. It is also possible for hModule to specify an .mui file, in which case only that file is searched for resources.
Syntax
BOOL EnumResourceNames( HMODULE hModule,
LPCTSTR lpszType,
ENUMRESNAMEPROC 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.
If this parameter is NULL, that is equivalent to passing in a handle to the module used to create the current process.
lpszType
[in] Pointer to a null-terminated string specifying the type of the resource for which the name 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 .
lpEnumFunc
[in] Pointer to the callback function to be called for each enumerated resource name or ID. For more information, see EnumResNameProc .
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 the function succeeds or FALSE if the function does not find a resource of the type specified, or if the function fails for another reason. To get extended error information, call GetLastError .
GetLastError value
NO_ERRORWindows 95/98/Me: No resource of the specified type was found.
ERROR_RESOURCE_TYPE_NOT_FOUNDWindows NT/2000/XP: No resource of the specified type was found.
any other return valueSome other type of error occurred.
Remarks
For each resource found, EnumResourceNames calls an application-defined callback function lpEnumFunc, passing the name or the ID of each resource it finds, as well as the various other parameters that were passed to EnumResourceNames.
Alternately, applications can call EnumResourceNamesEx , which provides more precise control of what resources are enumerated.
If a resource has an ID, the ID is passed to the callback function; otherwise the resource name is passed to the callback function. For more information, see EnumResNameProc.
The EnumResourceNames function continues to enumerate resources until the callback function returns FALSE or all resources 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 a .mui file associated with it. If no .mui files are found, only resources 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 .mui file search stops. Because all .mui files that correspond to a single LN file have the same resource types, only the resources in the found .mui file need to be enumerated.
The enumeration never includes duplicates: if resources with the same name are 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 , EnumResourceNamesEx , EnumResNameProc , EnumResourceLanguages , EnumResourceTypes
==原始网址==http://msdn.microsoft.com/en-us/library/ms648037(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:19:32