范例01:根据进程句柄获取进程ID
//TSL解析器路径
path := "D:\\Program Files\\AnalyseNG.NET\\TSL.exe";
//创建管道
ret:= SysExecNewPipe();
//创建一个TSL解析器进程
If ret then
handle:=SysExec(path,"TSL",nil,0,code);//返回进程句柄
ret := SysPidOfHandle(handle);
SysTerminate(rc,handle);//关闭TSL解析器进程
if ret then
return ret;
else
return "根据进程句柄获取进程ID失败!"