?? filethreaddevice.h
字號(hào):
// FileThreadDevice.h
//
// Generated by DriverWizard version DriverStudio 2.6.0 (Build 336)
// Requires Compuware's DriverWorks classes
//
#ifndef __FileThreadDevice_h__
#define __FileThreadDevice_h__
////////////////////////////////////////////////////////////////////
// TestThread
//
// TestThread is a subclass of KSystemThread. It adds a queue and
// a semaphore, and a method for queuing an IRP and signaling the
// thread.
//
class TestThread : public KSystemThread
{
SAFE_DESTRUCTORS
public:
TestThread(void);
VOID Post(KIrp I);
KInterlockedList<IRP> m_Queue;
KSemaphore m_Mailbox;
};
class FileThreadDevice : public KPnpDevice
{
// Constructors
public:
SAFE_DESTRUCTORS;
FileThreadDevice(PDEVICE_OBJECT Pdo, ULONG Unit);
~FileThreadDevice();
// 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);
MEMBER_THREAD (FileThreadDevice, Stage)
#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 Stage(void); // COMMENT_ONLY
#endif
// Member Data
protected:
// Unit number for this device (0-9)
ULONG m_Unit;
KPnpLowerDevice m_Lower;
TestThread m_Stage;
};
#endif
#define MAX_IRP 1000000
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -