CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  C/C++ >  C语言

一个十分困惑的问题.

楼主KIKKA(海冰)2003-02-04 16:34:57 在 C/C++ / C语言 提问

我想在我的一个程序里运行其他程序该怎么做?比如在程序中想打开EDIT.exe这个程序(让它运行起来),可以用些什么方法? 问题点数:100、回复次数:7Top

1 楼rtdb(东临碣石)回复于 2003-02-04 16:42:01 得分 15

WINDOWS:   Winexec(),   CreateProcess()  
   
  DOS/UNIX:   system()Top

2 楼oustar(欧文)回复于 2003-02-04 16:47:52 得分 15

The   CreateProcess   function   creates   a   new   process   and   its   primary   thread.   The   new   process   executes   the   specified   executable   file.    
   
  BOOL   CreateProcess(  
      LPCTSTR   lpApplicationName,  
                                                    //   pointer   to   name   of   executable   module  
      LPTSTR   lpCommandLine,     //   pointer   to   command   line   string  
      LPSECURITY_ATTRIBUTES   lpProcessAttributes,     //   process   security   attributes  
      LPSECURITY_ATTRIBUTES   lpThreadAttributes,       //   thread   security   attributes  
      BOOL   bInheritHandles,     //   handle   inheritance   flag  
      DWORD   dwCreationFlags,   //   creation   flags  
      LPVOID   lpEnvironment,     //   pointer   to   new   environment   block  
      LPCTSTR   lpCurrentDirectory,       //   pointer   to   current   directory   name  
      LPSTARTUPINFO   lpStartupInfo,     //   pointer   to   STARTUPINFO  
      LPPROCESS_INFORMATION   lpProcessInformation     //   pointer   to   PROCESS_INFORMATION  
  );  
     
  form   msdn   !  
  GOOD   LUCK!Top

3 楼KIKKA(海冰)回复于 2003-02-05 01:15:41 得分 0

不解~!  
  能说详细点吗?在TC下用C语言该怎么做?Top

4 楼acange(acan)回复于 2003-02-05 01:58:26 得分 50

简单的,   你可以这样:  
   
  #include<stdlib.h>  
   
  int   main()  
  {  
      system("dir");  
  }Top

5 楼x2jack(捷可)回复于 2003-02-05 02:09:45 得分 10

system("命令行");Top

6 楼chenxihui2003(晨曦)回复于 2003-02-05 12:02:02 得分 5

UPTop

7 楼sea_lover(CodePlus)回复于 2003-02-05 13:33:35 得分 5

acange(acan)   的就可以!  
   
   
   
   
   
  -------------------------  
  【◇SeaLover◆〗  
      /                     \  
    ★---CSDN---☆  
   \                     /  
  【○Trust   Me●〗  
  Top

相关问题

  • 困惑......困惑......
  • 困惑
  • 困惑!!!!!
  • 困惑。。。
  • 困惑
  • 困惑
  • 困惑
  • 困惑!
  • 困惑~~
  • 困惑

关键词

  • createprocess
  • 程序
  • pointer
  • attributes
  • executable
  • process

得分解答快速导航

  • 帖主:KIKKA
  • rtdb
  • oustar
  • acange
  • x2jack
  • chenxihui2003
  • sea_lover

相关链接

  • C/C++ Blog
  • C/C++类图书
  • C/C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo