首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

在DLL中调用EXE,该如何处理

2012-03-02 
在DLL中调用EXEDelphi(Pascal) codefunction GetController:TForm1stdcallbeginwith TForm1.Create(nil)

在DLL中调用EXE

Delphi(Pascal) code
function GetController:TForm1;stdcall;begin  with TForm1.Create(nil) do  try    Show;  except    Free;  end;end;exports GetController;


现在想用上面的这个函数调用某个文件夹下面的A.EXE,请问应该怎么做?



[解决办法]
ShellExecute,在ShellApi单元中
[解决办法]
winexec ?
有试过这个函数吗?
[解决办法]
在DLL中和EXE中调用外部程序方法相同
DLL
Delphi(Pascal) code
procedure GetController; stdcall;begin  ShellExecute(0, 'open', 'calc.exe', nil, nil, SW_SHOWNORMAL);end;exports  GetController; 

热点排行