driver.h

来自「USB sniffer for windows」· C头文件 代码 · 共 53 行

H
53
字号
// Declarations for UsbSnoop driver
// Generated by Walt Oney's driver wizard

#ifndef DRIVER_H
#define DRIVER_H

#include "usbdi.h"

//	CONSTANT DECLARATION
//	ADDED By Valette Jean-S閎astien

#define BUFFER_SIZE 1048576


///////////////////////////////////////////////////////////////////////////////
// Device extension structure

typedef struct tagDEVICE_EXTENSION {
	PDEVICE_OBJECT DeviceObject;			// device object this extension belongs to
	PDEVICE_OBJECT LowerDeviceObject;		// next lower driver in same stack
	PDEVICE_OBJECT Pdo;						// the PDO
	IO_REMOVE_LOCK RemoveLock;
	ULONG		   uSequenceNumber;
	PDRIVER_OBJECT OriginalDriverObject;
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;

// For our context information

typedef struct {
	// information for the old CompletionRoutine
	PIO_COMPLETION_ROUTINE CompletionRoutine;
    PVOID Context;
    UCHAR Control;

	// what we need : the saved PURB & its number
	PURB pUrb;
	ULONG uSequenceNumber;

	// the stack where we should restore information
	PIO_STACK_LOCATION Stack;
} CONTEXT, * PCONTEXT;

///////////////////////////////////////////////////////////////////////////////
// Global functions

VOID RemoveDevice(IN PDEVICE_OBJECT fdo);
NTSTATUS CompleteRequest(IN PIRP Irp, IN NTSTATUS status, IN ULONG info);

extern BOOLEAN win98;
extern UNICODE_STRING servkey;

#endif // DRIVER_H

⌨️ 快捷键说明

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