如何在c中执行exe [英] how execute exe in c
问题描述
您好,
我想知道如何使用c prgogram执行exe文件?我是b $ b在Linux上使用GNU GCC有人可以解释一下如何做到这一点吗?
发送邮件chellappa在gmail .com
谢谢你提前...
问候
chellappa
Hello,
I would like to know how i can execute an exe file using c prgogram? I
am using the GNU GCC in Linux Could someone explain me how to do that ?
send mail chellappa at gmail .com
Thanks in advance...
Regards
chellappa
推荐答案
使用:
系统(Exename);
这将在新shell中执行exe文件
chellappa < N ********* @ gmail.com>。在消息中写道
news:11 ********************* @ g43g2000cwa.googlegro ups.com ...
use :
system("Exename");
this will execute the exe file in a new shell
"chellappa" <N.*********@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
您好,
我想知道如何使用c prgogram执行exe文件?我在Linux中使用GNU GCC有人可以解释一下如何做到这一点吗?
在gmail发送邮件chellappa .com
提前感谢...
问候
chellappa
Hello,
I would like to know how i can execute an exe file using c prgogram? I
am using the GNU GCC in Linux Could someone explain me how to do that ?
send mail chellappa at gmail .com
Thanks in advance...
Regards
chellappa
我认为system()函数的执行是特定于操作系统的。传递给system()函数的参数
将由本机OS
运行时环境执行。所以我认为linux中的系统(.exe)不会执行
执行。
I think execution of system() function is OS specific. The parameter
passed to the system() function will be executed by the native OS
runtime environment. So i think system(.exe) in linux will not get
executed.
chellappa写道:
chellappa wrote:
你好,
我想知道如何使用c prgogram执行exe文件?我在Linux中使用GNU GCC有人可以解释一下如何做到这一点吗?
在gmail发送邮件chellappa .com
提前感谢...
问候
chellappa
Hello,
I would like to know how i can execute an exe file using c prgogram? I
am using the GNU GCC in Linux Could someone explain me how to do that ?
send mail chellappa at gmail .com
Thanks in advance...
Regards
chellappa
系统(命令)是一个不错的选择,但你可以做更多的leet,比如
定义一个char在哪里你存储你的exe十六进制值,然后通过一个来自流的指针或类似的东西来执行它。
对于99%的用户来说,第一选择是最常见的,如果你没有b / b
不打算像第二个选择那样做一些不寻常的事情。
system("command") is a good choice, but you can do It more "leet", like
defining a char where you store your exe hex values, then execute it
through a pointer from a stream, or something like that.
For 99% of users the first choice is the most common, that if you
don''t plan to do something unusual like in the second choice :)
这篇关于如何在c中执行exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!