使用C调用其他可执行文件? [英] Invoking other executable prgms using C?

查看:101
本文介绍了使用C调用其他可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




是否可以使用C-Program打开像NOTEPAD(win)

这样的可执行程序...(功能系统除外) ())?如果是的话,请

为我提供一个例如代码...如果不是为什么?


提前致谢。

hi

Is it possible to open an executable program like NOTEPAD(win)
using C-Program...(other than the function system() )? if so,please
provide me with an eg code...if not why?

Thanks in advance.

推荐答案

Pravin写道:
hi

是否可以打开像NOTEPAD这样的可执行程序(win)<使用C-Program ...(功能系统()除外)?如果是的话,请
给我提供一个例如代码...如果不是为什么?

提前致谢。
hi

Is it possible to open an executable program like NOTEPAD(win)
using C-Program...(other than the function system() )? if so,please
provide me with an eg code...if not why?

Thanks in advance.



当你说开放"我认为你的意思是执行。如果你想

真的只是打开一个文件,fopen就可以帮助你。


如果你想执行任何程序,那么唯一的标准C电话是

system()。


< OT Call =" POSIX">

我的系统有另一个一组调用exec *(execl,execv等)

(#include< unistd.h>),它接近(但肯定它不一样。)

您可以参考编译器的手册,看看它是否有类似的东西,并且它有满足您需求的东西。


但是,请注意这是非主题,以进一步讨论

非标准C调用。如果您对

电话有疑问,请转到相关(OS和/或编译器特定)组。

< / OT>
< br $> b $ b -

(欢迎) http://www.ungerhu.com/jxh/clc.welcome.txt

(clc FAQ) http://c-faq.com/


" Pravin" < PR *********** @ gmail.com>写道:
"Pravin" <pr***********@gmail.com> writes:
是否可以使用C-Program打开像NOTEPAD(win)这样的可执行程序...(除了函数系统())?如果是的话,请
给我提供一个例如代码...如果不是为什么?
Is it possible to open an executable program like NOTEPAD(win)
using C-Program...(other than the function system() )? if so,please
provide me with an eg code...if not why?




标准C中没有办法执行除了

system()函数。您的

系统可能还有其他方法;如果你想了解更多信息,你需要在一个

新闻组中询问你的系统特有的(不是comp.lang.c)。


-

Keith Thompson(The_Other_Keith) ks***@mib.org < http ://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。



There is no way in standard C to execute another program other than
the system() function. There may be other methods available on your
system; if you want more information, you''ll need to ask in a
newsgroup that''s specific to your system (not comp.lang.c).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


2005年12月27日星期二06:51:24 UTC,Pravin < pr *********** @ gmail.com>

写道:
On Tue, 27 Dec 2005 06:51:24 UTC, "Pravin" <pr***********@gmail.com>
wrote:
是否可以打开像这样的可执行程序NOTEPAD(win)
使用C-Program ...(除了功能系统())?如果是的话,请
提供一个例如代码...如果不是为什么?
Is it possible to open an executable program like NOTEPAD(win)
using C-Program...(other than the function system() )? if so,please
provide me with an eg code...if not why?




如果你想要一个特定于Windows的答案(作为你的问题排序)暗示)

然后你可能会更好地跨站到Windows编程新闻组

- 发布到OS / 2编程组不会有太多帮助!


OTOH,如果*是* OS / 2帮助您,请再次询问。



If you want a Windows-specific answer (as your question sort of implies)
then you might do better to crosspost to a Windows programming newsgroup
- posting to an OS/2 programming group won''t help much!

OTOH, if it *is* OS/2 help you require, please ask again.


这篇关于使用C调用其他可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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