简单问题:在DELPHI中调用外部程序的语法?

zbw 2000-03-28 10:53:00
...全文
156 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
jll 2000-03-29
  • 打赏
  • 举报
回复
前面有这样的帖子,找找看……
zbw 2000-03-29
  • 打赏
  • 举报
回复
好象不太管用,可能要用shell,能否谈谈shell?
zbw 2000-03-29
  • 打赏
  • 举报
回复
谢谢各位!给分有限。
Firing_Sky 2000-03-29
  • 打赏
  • 举报
回复
最简单的就是用ShellExecute了,如果你要知道调用的进程什么时候终止,就只有用OpenProcess
Lin 2000-03-29
  • 打赏
  • 举报
回复
用ShellExecute试试看?
ShellExecute(handle, 'Open', 'U Program Here', 'Parameters Hers', nil, SW_SHOW);
Lin 2000-03-29
  • 打赏
  • 举报
回复
用ShellExecute试试看?
HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
yangfan 2000-03-28
  • 打赏
  • 举报
回复
var
StartInf:TSTARTUPINFO;
ProInf:TProcessInformation;
ExeName:string;

begin
StartInf.cb := SizeOf(TSTARTUPINFO);
ExeName := 'C:\***.exe'; //your exe Name
CreateProcess( Pchar(ExeName),'',nil,nil,FALSE,
CREATE_DEFAULT_ERROR_MODE,
nil,
nil,
StartInf,
ProInf);
end;

关闭此进程
TerminateProcess(ProInf.hProcess,0);

zbw 2000-03-28
  • 打赏
  • 举报
回复
因急用,可否具体说说?
kxy 2000-03-28
  • 打赏
  • 举报
回复
看windowsAPI的help
Exec or CreateProcess

5,379

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧