1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| While (True)
'lancer le process et attendre qu'il finisse de s'exécuter
lPid = Shell(exeApp, icodeVisible)
If lPid <> 0 Then
'Get a handle to the shelled process.
lHnd = OpenProcess(SYNCHRONIZE, 0, lPid)
'If successful, wait for the application to end and close the handle.
If lHnd <> 0 Then
ModuleUtil.WriteINIString fichIniName, "VBTURN", "LAST", Date & " " & Time
lRet = ModuleProcess.WaitForSingleObject(lHnd, INFINITE)
ModuleProcess.CloseHandle (lHnd)
End If
DoEvents
Sleep pause
End If
Wend
Exit Sub |
Partager