📄 usbcounterdevice.h
字号:
// USBCounterDevice.h
//
// Generated by DriverWizard version DriverStudio 3.1.0 (Build 1722)
// Requires Compuware's DriverWorks classes
//
#ifndef __USBCounterDevice_h__
#define __USBCounterDevice_h__
class USBCounterDevice : public KPnpDevice
{
// Constructors
public:
SAFE_DESTRUCTORS;
USBCounterDevice(PDEVICE_OBJECT Pdo, ULONG Unit);
~USBCounterDevice();
// 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 OnQueryCapabilities(KIrp I);
void GetStringDescriptors(void);
NTSTATUS ResetCounter();
NTSTATUS ReadCounterAsynch(KIrp I);
DEVMEMBER_CANCELIRP(USBCounterDevice, Cancel)
MEMBER_COMPLETEIRP( USBCounterDevice, ReadCounterComplete )
MEMBER_COMPLETEIRP( USBCounterDevice, OnQueryCapabilitiesComplete )
MEMBER_IOWORKITEMFUNCTION( USBCounterDevice, 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
#endif
// Member Data
protected:
// Unit number for this device (0-9)
ULONG m_Unit;
KUsbLowerDevice m_Lower;
KUsbInterface m_Interface;
// Pipe for USB endpoint 1 IN (address 0x81)
KUsbPipe m_Endpoint1IN;
UCHAR m_buffer[8];
KIrp m_kIrp;
PURB m_pUrb;
KIoWorkItem m_pItem;
};
#define NUM_STRING_DESCRIPTORS 5
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -