| imho.ws |
![]() |
|
|
|
# 1 |
|
Newbie
Регистрация: 20.05.2003
Сообщения: 34
![]() ![]() ![]() |
WinExec, CreateProcess
Приветствую всех!!!
Вопрос простой, но я запарился честное слово. Пробую программировать в Делфях (без литературы и пр.) - запускаю другой процесс, но ... мне необходимо дождаться его завершения, а Делфя после функции WinExec шпарит дальше, отсюда облом. Раскидайте пож-та как энто пройти... |
|
|
|
|
# 2 |
|
Member
Регистрация: 10.03.2002
Адрес: Israel
Сообщения: 245
![]() ![]() |
WaitForSingleObject -тебе поможет.
Только без документации совсем плохо. Хочешь работать с Windows - придется читать MSDN. MSDN : Код:
WaitForSingleObject The WaitForSingleObject function returns when one of the following occurs: The specified object is in the signaled state. The time-out interval elapses. To enter an alertable wait state, use the WaitForSingleObjectEx function. To wait for multiple objects, use the WaitForMultipleObjects. DWORD WaitForSingleObject( HANDLE hHandle, DWORD dwMilliseconds ); Parameters hHandle [in] Handle to the object. For a list of the object types whose handles can be specified, see the following Remarks section. If this handle is closed while the wait is still pending, the function's behavior is undefined. The handle must have the SYNCHRONIZE access right. For more information, see Standard Access Rights. dwMilliseconds [in] Time-out interval, in milliseconds. The function returns if the interval elapses, even if the object's state is nonsignaled. If dwMilliseconds is zero, the function tests the object's state and returns immediately. If dwMilliseconds is INFINITE, the function's time-out interval never elapses. ....... The WaitForSingleObject function can wait for the following objects: Change notification Console input Event Job Memory resource notification Mutex Process Semaphore Thread Waitable timer
__________________
Best Regards |
|
|