Показать сообщение отдельно
Старый 03.04.2004, 11:23     # 2
alexey_ma
Member
 
Регистрация: 10.03.2002
Адрес: Israel
Сообщения: 245

alexey_ma Нимб уже пробиваетсяalexey_ma Нимб уже пробивается
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
alexey_ma вне форума