event.h

来自「奇迹世界公用文件源代码,研究网络游戏的朋友可以研究下」· C头文件 代码 · 共 35 行

H
35
字号


#ifndef __EVENT_H__
#define __EVENT_H__

#pragma once

#include <windows.h>
#include "tstring.h"

namespace util{

class CEvent{ // 捞亥飘 包访 扁瓷阑 力傍窍绰 努贰胶
private:
	HANDLE m_hEvent; // 捞亥飘 按眉

public:
	CEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState);
	CEvent(LPSECURITY_ATTRIBUTES lpSecurityAttributes, BOOL manualReset, BOOL initialState, const _tstring& name);
	CEvent(const CEvent& rhs);
    CEvent& operator=(const CEvent& rhs);
	virtual ~CEvent(void);
	
    HANDLE GetEvent() const;
	void Wait() const;
    BOOL Wait(DWORD timeoutMillis) const;
    void Reset();
    void Set();
    void Pulse();
};

}//End of namespace : util

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?