![]() |
WaitForSingleObject mal anders...
Ich würde gerne überprüfen ob eine Application ordentlich gestartet wurde. In diesem Falle ein mySQL Server...
Delphi-Quellcode:
Danke schonmal im Vorraus und verzeihung, wenn ich eine etwaige Antwort übersehen habe...
procedure ShellExecute_AndWait(FileName: string; Params: string);
var exInfo: TShellExecuteInfo; Ph: DWORD; begin FillChar(exInfo, SizeOf(exInfo), 0); with exInfo do begin cbSize := SizeOf(exInfo); fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT; Wnd := GetActiveWindow(); ExInfo.lpVerb := 'open'; ExInfo.lpParameters := PChar(Params); lpFile := PChar(FileName); nShow := SW_SHOWNORMAL; end; if ShellExecuteEx(@exInfo) then Ph := exInfo.HProcess else begin ShowMessage(SysErrorMessage(GetLastError)); Exit; end; while WaitForSingleObject(ExInfo.hProcess, 50) <> WAIT_OBJECT_0 do Application.ProcessMessages; CloseHandle(Ph); end; ShellExecute_AndWait('C:\mysql\bin\mysqld-nt.exe', '' |
Re: WaitForSingleObject mal anders...
|
Re: WaitForSingleObject mal anders...
ok stimmt...
Also eigentlich meinte ich das so...wenn ich mysql-nt z.B. aufrufe, dann dauert es ja eine Weile eh die DB fertig geladen ist. Und DAS wollte ich eigentlich abfragen...anscheinend ginge das nicht...hmmm, "Notlösung" wäre, dass ich das Konsolenfenster nach einen Needle durchsuche ;) vielen Danke Florian |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:07 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz