function PrintFile(afile: msestring; out aprintcommand: msestring;
atimeout: integer = 0): integer;
var
 print_cmd:msestring;
 usegui: boolean;
 print_ph: integer;

begin
 print_cmd:= GetFinalCommand(afile, usegui);
 aprintcommand:= print_cmd;

 if print_cmd <> '' then begin // if(1)
  if usegui then begin // if(2)
   print_ph:= execmse2(print_cmd,nil,nil,nil,-1,[exo_inactive]);
   activateprocesswindow(print_ph);
    waitforprocess(print_ph); // <<< HERE
   result:= 0; // GUI всегда ОК
  end else begin
   print_ph:= execmse2(print_cmd);
   getprocessexitcode(print_ph,result,atimeout*1000000);
  end;
 end else
  result:= 99; // no command to print

end;
------------------------------------------

"print_cmd" is formed  as "<path_to_GSVIEW32>\gsview32.exe <ps_file>".

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to