//以下函数都:
Header Declared in Winbase.h; include Windows.h.
Library Link to Kernel32.lib
--------------------------------------------------
HANDLE CreateEvent(
LPSECURITY_ATTRIBUTES lpEventAttributes,//常为NULL
BOOL bManualReset,//手动重置
BOOL bInitialState,//事件初始[是否受信]状态
LPCTSTR lpName//事件对象名
);
hEvent=CreateEvent(NULL,TRUE,FALSE,NULL) ;
//创建事件对象失败
if( hEvent==NULL || hEvent==INVALID_HANDLE_VALUE)
return ;
--------------------------------------------------
BOOL SetEvent(
HANDLE hEvent
);
--------------------------------------------------
BOOL ResetEvent(
HANDLE hEvent
);
--------------------------------------------------
BOOL CloseHandle(
HANDLE hObject
);
--------------------------------------------------
WaitForSingleObject(
HANDLE hHandle,
DWORD dwMilliseconds
);//返回WAIT_OBJECT_0时,表示事件处于信号态,否则处于非信号态。