请告诉我如何通过fopen打开.exe文件 [英] Please tell how to open a .exe file through fopen

查看:178
本文介绍了请告诉我如何通过fopen打开.exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

fopen("temp.exe",r);





[更新]

i希望在没有系统调用的情况下在exe内运行exe



我尝试了什么:



exe文件或可执行文件可以在c程序中打开确定它不是正在执行的文件。我的意思是,当一个名为temp.exe的程序在该程序中运行n时,另一个说text.exe文件开始运行



[Update]
i want to run exe within exe without system call

What I have tried:

exe file or executable file can be opened in c program when it is sure that its not the file that is in execution. i mean while a program named temp.exe is running n in that program another say text.exe file starts running

推荐答案

我假设你的意思是运行而不是打开。如果是这样,请使用 CreateProcess [ ^ ]。



/ ravi
I assume you mean "run" and not "open". If so, use CreateProcess[^].

/ravi


Quote:

请告诉我如何通过fopen打开.exe文件

Please tell how to open a .exe file through fopen

fopen 用于读取或写入文件,而不是用于启动可执行文件。

fopen is used to read or write in a file, not to launch an executable.

引用:

我想要在没有系统调用的情况下在exe中运行exe

i want to run exe within exe without system call

没有其他方法。

实际上还有另一种方法:你只需复制那个系统调用。





[更新]

There is no other way.
In fact there is another way: you just have to duplicate that system call.


[Update]

引用:

那里肯定有一些方法可以做到这一点,因为如果没有这种方式,那么我们的操作系统也将无法正常工作基本在于这个概念

there surely are some ways possible to do so because if there is no such way then our operating system will also not work its basic lie in this concept



操作系统建立规则以防止同时运行的程序之间发生冲突。你想要做的只是打破所有这些规则。

你可以做到,但你必须找到如何。


The OS establish rules to prevent conflicts between programs running at same time. What you want to do simply break all those rules.
You can do it, but you have to find how.


这篇关于请告诉我如何通过fopen打开.exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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