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

📄 vbusdev.h

📁 WDM的驱动程序实例,可供自学开发WDM者参考,其是在VC和COMPUWARE下的.
💻 H
字号:
// vbusdev.h
//
// Generated by DriverWizard version DriverStudio 2.7.0 (Build 554)
// Requires Compuware's DriverWorks classes
//

#ifndef __VBUSDEV_H__
#define __VBUSDEV_H__

#include "vpdo.h"

class VBus : public KBus
{
	// Constructors
public:
	SAFE_DESTRUCTORS;
	VBus() {}
	~VBus() {}

	// check if id is already used
	bool IdUsed(ULONG id);

	// remove child with id
	bool RemoveChild(ULONG id);
};

class VBusDevice : public KPnpDevice
{
	// Constructors
public:
	virtual SAFE_DESTRUCTORS;
	VBusDevice(PDEVICE_OBJECT Pdo);
	~VBusDevice();

	// Member Functions
public:
	DEVMEMBER_DISPATCHERS
	virtual NTSTATUS OnStartDevice(KIrp I);
	virtual NTSTATUS OnStopDevice(KIrp I);
	virtual NTSTATUS OnRemoveDevice(KIrp I);
	virtual NTSTATUS OnSurpriseRemoval(KIrp I);
	virtual NTSTATUS OnQueryDeviceRelations(KIrp I);
	virtual NTSTATUS DefaultPnp(KIrp I);
	virtual NTSTATUS DefaultPower(KIrp I);
	virtual NTSTATUS OnDevicePowerUp(KIrp I);
	virtual NTSTATUS OnDeviceSleep(KIrp I);

	virtual DEVICE_POWER_STATE DetermineNewDevicePowerState(SYSTEM_POWER_STATE SystemPowerState);

	NTSTATUS VBUS_IOCTL_ADD_DEVICE_Handler(KIrp I);
	NTSTATUS VBUS_IOCTL_DELETE_DEVICE_Handler(KIrp I);

	DEVICE_CAPABILITIES& DevCaps() { return m_DeviceCapabilities; }

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

	// Member Data
protected:
	KPnpLowerDevice		m_Lower;
	VBus				m_Bus;
};

#endif // __VBUSDEV_H__

⌨️ 快捷键说明

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