为了这段代码,泡了几天的CSDN论坛。好不容易啊,做个记号。以后拿来就可以用!
有时候直接调用.exe程序,进程里看着不爽。所以改了后缀,然后调用。
var si: TStartupInfo; pi: TProcessInformation; begin ZeroMemory(@si, SizeOf(si)); ZeroMemory(@Pi, SizeOf(pi)); si.cb := SizeOf(si); if CreateProcessA(PChar('c:2.dat'), '', nil, nil, False, 0, nil, nil, si, pi) then begin CloseHandle(pi.hProcess); CloseHandle(pi.hThread); end; end;
标签:delphi
发表评论