cusbevent.h

来自「一个内核开发的usb加密解密驱动」· C头文件 代码 · 共 66 行

H
66
字号
#pragma once

#ifndef _USBCNTLEVENT_H  
#define _USBCNTLEVENT_H

//--------------------------------------------------------------------
// Include

#include <windows.h>
#include <tchar.h>
#include <string.h>
#include <string>

using namespace std;

#include "USBSdMgr.h"		// Class for access right setting

//--------------------------------------------------------------------
// define

#define	CM_EVENT_PRENAME		L"USBCNTL_Event_"		// Event prefix character string

/*@
  @class	CUSBCntlEvent
  @brief	Event control class
  @header	.\DtsSdMgr.h
  @variable	#HANDLE		m_hEvent			:Service stop event steering wheel
  @variable	#wstring	m_wstrEventName		:name of the event
  @variable	#DtsSdMgr	m_cDtsSdMgr			:Class for access right setting
  @*/
class CUSBEvent
{
public:
	CUSBEvent(void);
	~CUSBEvent(void);

protected:
	// Service stop event steering wheel
	HANDLE m_hEvent;
	// name of the event
	wstring m_wstrEventName;
	// Class for access right setting
	CUSBCntlSdMgr m_cUsbSdMgr;

public:

	// Generation of event
	BOOL CreateWithName(PWCHAR pwszModuleName, BOOL bManualReset=TRUE);
	BOOL Create(PWCHAR pwszEventName, BOOL bManualReset=TRUE);
	// Opening of event
	BOOL OpenWithName(PWCHAR pwszModuleName);
	BOOL Open(PWCHAR pwszEventName);
	// Close of event
	BOOL Close(void);
	// Making of event signal
	BOOL SetEvent(void);
	// Making of event non-signal
	BOOL ResetEvent(void);
	// Acquisition of event steering wheel
	HANDLE GetEventHandle(void)
						{ return (HANDLE)this->m_hEvent; };

};

#endif /* end _USBCNTLEVENT_H */

⌨️ 快捷键说明

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