Windows PE 资源

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4072455/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:31:24  来源:igfitidea点击:

Windows PE Resources

windowsresourceseditorexecutable

提问by B.Gen.Hyman.O.Neill

there are many windows PE resource viewers programs. But how do they work? Do they decode function calls to winapi, or does PE have some section for GUI information? Like Android has XML GUI definitons? Thanks.

有许多 windows PE 资源查看器程序。但是它们是如何工作的呢?他们是否将函数调用解码为 winapi,或者 PE 是否有一些用于 GUI 信息的部分?就像 Android 有 XML GUI 定义一样?谢谢。

采纳答案by Martin v. L?wis

There are probably different implementation strategies, so it's not possible to answer this universally for all tools.

可能存在不同的实施策略,因此不可能对所有工具都统一回答这个问题。

The PE file format specificationis publicly available. It specifies the section structure of a PE file, how to find the .rsrc section in the file, and how to extract individual resources from that section. The individual resource formatsare also documented on MSDN. For example, the dialog GUI definitions are defined in the DLGTEMPLATEstructure.

PE文件格式规范是公开的。它指定了 PE 文件的节结构、如何在文件中找到 .rsrc 节以及如何从该节中提取单个资源。在各个资源的格式也被记录在MSDN上。例如,对话 GUI 定义在DLGTEMPLATE结构中定义。

回答by Nick Dandoulakis

There is an API for resources management. Check out Enumerating Resources.

有一个用于资源管理的 API。查看枚举资源

In certain situations application developers may want to discover the resource contents of an unknown Portable Executable (PE) module. The Windows SDK provides resource enumeration functions that enable an application to obtain lists of resource types, names, and languages in a specified module.

在某些情况下,应用程序开发人员可能希望发现未知的可移植可执行 (PE) 模块的资源内容。Windows SDK 提供资源枚举函数,使应用程序能够获取指定模块中的资源类型、名称和语言的列表。