timersampledevice.h

来自「windows 驱动程序开发相关资料与代码 让你深刻知晓windows 开发的魅」· C头文件 代码 · 共 60 行

H
60
字号
// TimerSampleDevice.h
//
// Generated by DriverWizard version DriverStudio 2.6.0 (Build 336)
// Requires Compuware's DriverWorks classes
//

#ifndef __TimerSampleDevice_h__
#define __TimerSampleDevice_h__


class TimerSampleDevice : public KPnpDevice
{
	// Constructors
public:
	SAFE_DESTRUCTORS;
	TimerSampleDevice(PDEVICE_OBJECT Pdo, ULONG Unit);
	~TimerSampleDevice();

	// Member Functions
public:
	DEVMEMBER_DISPATCHERS
	virtual NTSTATUS OnStartDevice(KIrp I);
	virtual NTSTATUS OnStopDevice(KIrp I);
	virtual NTSTATUS OnRemoveDevice(KIrp I);
	virtual NTSTATUS DefaultPnp(KIrp I);
	virtual NTSTATUS DefaultPower(KIrp I);
    DEVMEMBER_IOTIMER (TimerSampleDevice, Timer1Hz)
	MEMBER_DPC (TimerSampleDevice, TimerCallback);
	MEMBER_IOWORKITEMFUNCTION(TimerSampleDevice, Workitem)

#ifdef _COMMENT_ONLY

		// The following member functions are actually defined by the
		// a DEVMEMBER_xxx or MEMBER_xxx macro (such as DEVMEMBER_DISPATCHERS).
		// The macro __COMMENT_ONLY never gets defined.  These comment-only
		// definitions simply allow easy navigation to the functions within
		// the Developer Studio using the class browser.

	virtual NTSTATUS Create(KIrp I);				// COMMENT_ONLY
	virtual NTSTATUS Close(KIrp I);					// COMMENT_ONLY
	virtual NTSTATUS DeviceControl(KIrp I);			// COMMENT_ONLY
	virtual NTSTATUS SystemControl(KIrp I);			// COMMENT_ONLY
	VOID Timer1Hz(PVOID Context);
	VOID TimerCallback(PVOID Arg1, PVOID Arg2);		// COMMENT_ONLY
	VOID Workitem();
#endif

	// Member Data
protected:
		// Unit number for this device (0-9)
	ULONG				m_Unit;
	KPnpLowerDevice		m_Lower;

	ULONG				m_Delay;
	KTimedCallback		m_Tcb;
	KIoWorkItem			m_Item;
};

#endif

⌨️ 快捷键说明

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