IRP_MJ_DEVICE_CHANGE 0x18 IRP_MJ_QUERY_QUOTA 0x19 IRP_MJ_SET_QUOTA 0x1A IRP_MJ_PNP IRP_MJ_MAXIMUM_FUNCTION 0x1B 即插即用次要函数代码如下所示: 次要函数代码十六进制代码 IRP_MN_START_DEVICE 0x00 IRP_MN_QUERY_REMOVE_DEVICE 0x01
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) { DriverObject->MajorFunction[i] = MyLegacyFilterDispatch; } DriverObject->MajorFunction[IRP_MJ_CREATE] = MyLegacyFilterCreate; DriverObject->MajorFunction[IRP_MJ_CLOSE] = MyLegacyFilterClose; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM...
pDeviceExt->USzDeviceName =USzDeviceName; pDeviceExt->USzSysLinkName =USzSysLinkName;//设置分发函数for( i =0; i < IRP_MJ_MAXIMUM_FUNCTION; i++) { pDriverObj->MajorFunction[i] = &DispatchRoutine; } pDriverObj->MajorFunction[IRP_MJ_WRITE] = &DispatchWrite; pDriverObj->DriverUnload =...
?\\DDK");IoDeleteSymbolicLink(&SymbolicLinkName);IoDeleteDevice(driver->DeviceObject);DbgPrint("Driver Unload\n");}NTSTATUS DispatchRoution(IN PDEVICE_OBJECT DeciceObject, IN PIRP Irp){staticCHAR* irpname[] ={"IRP_MJ_CREATE","IRP_MJ_CREATE_NAMED_PIPE","IRP_MJ...
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1]; <--- } DRIVER_OBJECT; typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT; IRP callback (aka "Driver Dispatch Routines") functions are only used if the driver has registered a device. IRP's processing is handled by the IO manager. ...
文件查询(IRP_MJ_QUERY_INFORMATION) 目录下项查询(MajorFuncton: IRP_MJ_DIRECTORY_CONTROL, MinorFunction: IRP_MN_QUERY_DIRECTORY) 每类操作对应的内核函数如下表所示: 二、自己发送IRP请求操作文件的封装 1. 实现MDL链解锁及释放,完成例程的功能,后续的各IRP...
DriverObject->DriverUnload=DriverUnload; status=CreateDevice(DriverObject,&pDeviceObject); for(i=0;i<IRP_MJ_MAXIMUM_FUNCTION+1;i++) { DriverObject->MajorFunction[i]=DefaultDispatch; } DbgPrint("Hello world\n"); returnstatus; } NTSTATUSCreateDevice(...
for(i =0;i<=IRP_MJ_MAXIMUM_FUNCTION;i++) ppdd[i] = IoComplete; ppdd [IRP_MJ_CREATE] = DrivercreateClose; ppdd [IRP_MJ_DEVICE_CONTROL ] = DriverIoControl; g_drvobj = DriverObject; HookpIofCallDriver(); return status; }方法二例子 这个例子比较长,我们只看关键代码并说明. 1。将自...
12.网络传输层过滤 #define IRP_MN_BUS_RESET 0x87 1394.h fltKernel.h #define IRP_MJ_ACQUIRE_FOR_...
for(i =0;i<=IRP_MJ_MAXIMUM_FUNCTION;i++) ppdd[i] = IoComplete; ppdd [IRP_MJ_CREATE] = DrivercreateClose; ppdd [IRP_MJ_DEVICE_CONTROL ] = DriverIoControl; g_drvobj = DriverObject; HookpIofCallDriver(); return status; }方法二例子 这个例子比较长,我们只看关键代码并说明. 1。将自...