⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dmasampledevice.h

📁 WDM设备驱动程序开发(武安河)配套光盘实例源码。DMA编程实例。
💻 H
字号:
// DMASampleDevice.h
//
// Generated by DriverWizard version DriverStudio 2.6.0 (Build 336)
// Requires Compuware's DriverWorks classes
//

#ifndef __DMASampleDevice_h__
#define __DMASampleDevice_h__


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

	// Member Functions
public:
	DEVMEMBER_DISPATCHERS
	DEVMEMBER_CANCELIRP(DMASampleDevice, CancelQueuedIrp)
	virtual NTSTATUS OnStartDevice(KIrp I);
	virtual NTSTATUS OnStopDevice(KIrp I);
	virtual NTSTATUS OnRemoveDevice(KIrp I);
	VOID Invalidate(void);
	virtual NTSTATUS DefaultPnp(KIrp I);
	virtual NTSTATUS DefaultPower(KIrp I);
	void SerialRead(KIrp I);
	void SerialWrite(KIrp I);
	MEMBER_DPC(DMASampleDevice, IsrProxyTimer)//WAH
	DEVMEMBER_DMAREADY(DMASampleDevice, OnDmaReady)//WAH
	VOID StartDMA(ULONG PAddress,ULONG NBytes);//WAH

#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.

	VOID IsrProxyTimer(PVOID Arg1, PVOID Arg2);		// COMMENT_ONLY
	VOID OnDmaReady(KDmaTransfer* pXfer, KIrp I);	// COMMENT_ONLY
	VOID CancelQueuedIrp(KIrp I);					// COMMENT_ONLY
	virtual NTSTATUS CleanUp(KIrp I);				// COMMENT_ONLY
	virtual NTSTATUS Create(KIrp I);				// COMMENT_ONLY
	virtual NTSTATUS Close(KIrp I);					// COMMENT_ONLY
	virtual NTSTATUS SystemControl(KIrp I);			// COMMENT_ONLY
	virtual NTSTATUS Read(KIrp I);					// COMMENT_ONLY
	virtual VOID StartIo(KIrp I);					// COMMENT_ONLY
	virtual NTSTATUS Write(KIrp I);					// COMMENT_ONLY
#endif

	// Member Data
protected:
		// Unit number for this device (0-9)
	ULONG				m_Unit;
	KPnpLowerDevice		m_Lower;
		// The following members correspond to hardware resources in the
		// device.
	KDmaAdapter			m_Dma;
	KDmaTransfer* 		m_CurrentTransfer;
	KCommonDmaBuffer	m_Buffer;
	KTimedCallback		m_IsrProxyTimer;
};

#endif

⌨️ 快捷键说明

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