Procedure ExecuteWait(Programme: string); var ShExecInfo: TShellExecuteInfo; begin FillChar(ShExecInfo, SizeOf(ShExecInfo), 0); with ShExecInfo do begin cbSize := SizeOf(ShExecInfo); fMask := SEE_MASK_NOCLOSEPROCESS; lpFile := PChar(Programme); { le nom du programme } lpVerb := 'open'; nShow := SW_SHOW; end; if ShellExecuteEx(@ShExecInfo) then begin { on execute le programme } WaitForSingleObject(ShExecInfo.hProcess, INFINITE); { on attends un temps indefinie que l'appli s'arrete } end; end;
9 août 2020 à 11:13
Mais mon interface n'était pas complète comme je lui ai expliqué, car je ne savais pas attendre la fin d'un processus comme un batch shell ou une commande Dos.
Depuis le compilateur de langage Delphi pour Pascal alors qu'à PhotoStation l'Erp SAP-ABap me permettait de le savoir.
J'ai alors interrogé les Oracles sur Internet sur le site web code sources comment ça marche pour le savoir.
J'ai obtenu la réponse le lendemain. il me reste à l'intégrer car la méthode précédente était inexacte et incomplète avec un temps d'attente approximatif 1000 millisecondes !... Ce n'est plus le cas cette méthode obtenu avec discernement est exact et la temporisation supposée n'est plus utile dans ce cas !
9 août 2020 à 11:46