在DLL中调用EXE,该如何处理
在DLL中调用EXEDelphi(Pascal) codefunction GetController:TForm1stdcallbeginwith TForm1.Create(nil)
在DLL中调用EXE
Delphi(Pascal) codefunction 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) codeprocedure GetController; stdcall;begin ShellExecute(0, 'open', 'calc.exe', nil, nil, SW_SHOWNORMAL);end;exports GetController;