【问题标题】:c++ how to run an .exe file whose contents are stored in a char array?c++ 如何运行一个内容存储在char数组中的.exe文件?
【发布时间】:2012-02-02 03:05:07
【问题描述】:

我正在制作一个特定的程序,我只是想知道我是否可以这样做: 在 WINDOWS 上运行其内容存储在 char 数组中的文件。

这是读取可执行文件并将其存储在 char 数组中的代码:

filetoopen.open (C:\blahlbah.exe, ios::binary);
filetoopen.seekg (0, ios::end);
length = filetoopen.tellg();
filetoopen.seekg (0, ios::beg);
buffer = new char [length];
filetoopen.read (buffer, length);
filetoopen.close();

我听说过一些关于 RunPE 的事情,我进行了一些搜索,但没有成功找到任何要使用的 C++ 代码。

【问题讨论】:

标签: c++ char exe execute


【解决方案1】:

【讨论】:

  • 这是一个 C# 示例,而不是 C++。任何 C++ 示例?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-20
  • 1970-01-01
相关资源
最近更新 更多