如何获取有关使用C一个Windows可执行文件(.exe)的信息++ [英] How to get information about a Windows executable (.exe) using C++

查看:233
本文介绍了如何获取有关使用C一个Windows可执行文件(.exe)的信息++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建,将扫描几个目录和提取有关发现的可执行文件信息的软件。

I have to create a software that will scan several directories and extracts information about the executables found.

我需要做两件事情:


  • 确定给定的文件是一个可执行文件( .exe文件的.dll ,等等) - 检查扩展可能不够好。

  • 获取有关这个可执行文件的信息(公司名称的,在产品名称的,等等)。

  • Determine if a given file is an executable (.exe, .dll, and so on) - Checking the extension is probably not good enough.
  • Get the information about this executable (the company name, the product name, and so on).

我从来没有这样做,如果有一个Windows API(或轻量级的C / C ++库)要做到这一点,或者如果它甚至有可能因此我不知道。我想这是因为的Explorer.exe 做的。

I never did this before and thus am not aware if there is a Windows API (or lightweight C/C++ library) to do that or if it is even possible. I guess it is, because explorer.exe does it.

难道你们知道什么,可以点我在正确的方向?

Do you guys know anything that could point me in the right direction ?

非常感谢你的帮助。

推荐答案

您可以验证尽可能多的<一个href=\"http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/pecoff_v8.docx\">PE文件格式只要你想。如果你愿意,你也可以检查一个 PE文件签名 。然后,您可以使用文件版本API 检索公司名称,产品名称,版本号等等。

You can verify as much of the PE File Format as you want. If you want to, you can also check for a PE file signature. You can then use the File Version API to retrieve the company name, product name, version numbers, etc.

这篇关于如何获取有关使用C一个Windows可执行文件(.exe)的信息++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆