www.pudn.com > pcmcia_sample.rar > PcmciaDevice.h


// PcmciaDevice.h 
// 
// Generated by DriverWizard version DriverStudio 2.7.0 (Build 562) 
// Requires Compuware's DriverWorks classes 
// 
 
#ifndef __PcmciaDevice_h__ 
#define __PcmciaDevice_h__ 
 
// TODO:	The wizard creates a single driver managed queue class. 
//			You may choose to create additional classes derived from 
//			KDriverManagedQueueEx to help manage Irp processing.	 
class PcmciaDevice_DriverManagedQueue : public KDriverManagedQueueEx 
{ 
public: 
	SAFE_DESTRUCTORS; 
	VOID StartIo(KIrp I); 
}; 
 
class PcmciaDevice : public KPnpDevice 
{ 
	// Constructors 
public: 
	SAFE_DESTRUCTORS; 
	PcmciaDevice(PDEVICE_OBJECT Pdo, ULONG Unit); 
	~PcmciaDevice(); 
 
	// 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); 
	virtual NTSTATUS OnDevicePowerUp(KIrp I); 
	virtual NTSTATUS OnDeviceSleep(KIrp I); 
	void SerialRead(KIrp I); 
	void SerialWrite(KIrp I); 
 
#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 CleanUp(KIrp I);				// COMMENT_ONLY 
	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 
	virtual NTSTATUS Read(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; 
	PcmciaDevice_DriverManagedQueue m_DriverManagedQueue; 
// TODO:	Create additional driver managed queues.  These might be 
//			of the same class (PcmciaDevice_DriverManagedQueue), 
//			or you might choose to derive another class. 
}; 
 
#endif