阅读:958回复:2
在给IFS fiter driver的MajorFunction进行初始化时
请教:
在给IFS fiter driver的MajorFunction进行初始化时(就象下面的code这样) DriverObject->MajorFunction[IRP_MJ_CREATE] = SpyCreate; DriverObject->MajorFunction[IRP_MJ_CLOSE] = SpyClose; DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = SpyFsControl; 我的问题是:SpyCreate、SpyClose、SpyFsControl等等这样的函数的参数是不是只能有两个,且一定分别是PDEVICE_OBJECT和PIRP Irp的啊,也就是说这样的函数的形式是不是一定是NTSTATUS xxxCreate ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp )(主要是输入参数)这样的形式啊? |
|
沙发#
发布于:2004-01-05 21:21
对。。。。。
|
|
|
板凳#
发布于:2004-01-07 10:57
看看ddk
NTSTATUS (*PDRIVER_INITIALIZE) ( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ); PDRIVER_STARTIO DriverStartIo Is the entry point for the driver\'s StartIo routine, if any, which is set by the DriverEntry routine when the driver initializes. If a driver has no StartIo routine, this field is NULL. A StartIo routine is declared as follows: VOID (*PDRIVER_STARTIO) ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ); PDRIVER_UNLOAD DriverUnload Is the entry point for the driver\'s Unload routine, if any, which is set by the DriverEntry routine when the driver initializes. If a driver has no Unload routine, this field is NULL. An Unload routine is declared as follows: VOID (*PDRIVER_UNLOAD) ( IN PDRIVER_OBJECT DriverObject ); PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1] Is an array of one or more entry points for the driver\'s Dispatch routines. Each driver must set at least one Dispatch entry point in this array for the IRP_MJ_XXX requests that the driver handles. Any driver can set as many separate Dispatch entry points as the IRP_MJ_XXX codes that the driver handles. Each Dispatch routine is declared as follows: NTSTATUS (*PDRIVER_DISPATCH) ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ); :D |
|
|