本文整理自网络,侵删。
var
si: STARTUPINFO;
pi: PROCESS_INFORMATION;
begin
try //用try捕获异常
asm
nop
end;
RaiseException(1, 0, 0, 0); //抛异常
except
FillChar(si, SizeOf(si), 0); //处理异常
FillChar(pi, SizeOf(pi), 0);
si.cb := SizeOf(si);
if CreateProcess(PChar(ParamStr(0)), nil, nil, nil, False, 0, nil, nil, si,pi) then ExitProcess(0); //
end;
end;
相关阅读 >>
Delphi 用stringhelper.split分解字符串
更多相关阅读请进入《Delphi》频道 >>