Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual c++ 如何将EXE文件嵌入VC++;exe程序_Visual C++ - Fatal编程技术网

Visual c++ 如何将EXE文件嵌入VC++;exe程序

Visual c++ 如何将EXE文件嵌入VC++;exe程序,visual-c++,Visual C++,我想隐藏我的exe文件,它是VB代码,所以我想我可以在vc++代码中隐藏它,然后我可以从vc++代码中调用它,比如run(myfile.exe)或execute(myfile.exe)。 但是我不知道我怎么能把它添加到VC++里面 您可以使用 您需要进行两个阶段的工作: 编译时间:在构建C++应用程序时,必须指示VStudio将(VB)可执行文件(我命名为it Real.exe)嵌入到项目输出(C++生成的可执行文件)中作为资源;(当然)为此,您需要在构建时具有VB可执行文件 运行时间:C++

我想隐藏我的exe文件,它是VB代码,所以我想我可以在vc++代码中隐藏它,然后我可以从vc++代码中调用它,比如run(myfile.exe)或execute(myfile.exe)。 但是我不知道我怎么能把它添加到VC++里面

您可以使用

您需要进行两个阶段的工作:

  • 编译时间:在构建C++应用程序时,必须指示VStudio将(VB)可执行文件(我命名为it Real.exe)嵌入到项目输出(C++生成的可执行文件)中作为资源;(当然)为此,您需要在构建时具有VB可执行文件
  • 运行时间:C++应用程序必须能够从自身获取资源,将其保存到文件中,并执行它
这是一个我测试过的原型(它可以工作)。VStudio 10.0(2010)项目中需要包含3个文件: