You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
867 B
C++

#pragma once
#include <afxmt.h>
#include "MyWait.h"
#include "DllDefines.h"
class UTILITYDLL CEvt : public CMyWait
{
public:
CEvt(); // create an object without name, this object can only be used in the local thread
explicit CEvt(LPCTSTR pszNo); // create an object with the name pszNo
HANDLE GetEvt(BOOL bState);
~CEvt();
BOOL operator=(const BOOL bState);
BOOL operator==(const BOOL bState);
BOOL operator!=(const BOOL bState);
// Operations
BOOL WaitEvt(DWORD dwTimeOut = INFINITE);
BOOL WaitResetEvt(DWORD dwTimeOut = INFINITE);
BOOL WaitEvtEx(DWORD dwTimeOut = INFINITE);
BOOL WaitResetEvtEx(DWORD dwTimeOut = INFINITE);
BOOL Reset(void);
BOOL Set(void);
std::string GetEvtName();
private:
std::string m_strName;
CEvent m_evtActivate;
CEvent m_evtDeactivate;
};