cliicy
驱动牛犊
驱动牛犊
  • 注册日期2003-12-05
  • 最后登录2004-11-10
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:958回复:2

在给IFS fiter driver的MajorFunction进行初始化时

楼主#
更多 发布于:2004-01-05 18:31
请教:
在给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
)(主要是输入参数)这样的形式啊?
wowocock
VIP专家组
VIP专家组
  • 注册日期2002-04-08
  • 最后登录2016-01-09
  • 粉丝16
  • 关注2
  • 积分601分
  • 威望1651点
  • 贡献值1点
  • 好评度1227点
  • 原创分1分
  • 专家分0分
沙发#
发布于:2004-01-05 21:21
对。。。。。
花开了,然后又会凋零,星星是璀璨的,可那光芒也会消失。在这样 一瞬间,人降生了,笑者,哭着,战斗,伤害,喜悦,悲伤憎恶,爱。一切都只是刹那间的邂逅,而最后都要归入死亡的永眠
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
板凳#
发布于: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
琢磨悟真知
游客

返回顶部