melchior
驱动牛犊
驱动牛犊
  • 注册日期2002-07-09
  • 最后登录2018-05-29
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望15点
  • 贡献值0点
  • 好评度5点
  • 原创分0分
  • 专家分0分
  • 社区居民
阅读:2108回复:6

文件系统过滤驱动如何获得ZwCreateFile的参数CreationDisposition?

楼主#
更多 发布于:2003-04-09 09:51
我的IRP_MJ_CREATE分派例程从何处获得ZwCreateFile的CreationDisposition?
它是在IO_STACK_LOCATION的Options里吗?
nustzhua
驱动中牛
驱动中牛
  • 注册日期2002-06-19
  • 最后登录2015-09-27
  • 粉丝0
  • 关注0
  • 积分18分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-04-09 11:50
Irp->IoStatus
Pointer to an IO_STATUS_BLOCK structure that receives the final completion status and information about the requested operation. The file system sets the Information member of this structure to one of the following values:
FILE_CREATED

FILE_DOES_NOT_EXIST

FILE_EXISTS

FILE_OPENED

FILE_OVERWRITTEN

FILE_SUPERSEDED

不限容量的免费邮箱 www.k65.net
melchior
驱动牛犊
驱动牛犊
  • 注册日期2002-07-09
  • 最后登录2018-05-29
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望15点
  • 贡献值0点
  • 好评度5点
  • 原创分0分
  • 专家分0分
  • 社区居民
板凳#
发布于:2003-04-09 16:35
你看错了。我想得到的是ZwCreateFile的参数CreateDisposition。而不是IRP完成状态。
vcmfc
驱动中牛
驱动中牛
  • 注册日期2001-03-23
  • 最后登录2008-01-28
  • 粉丝0
  • 关注0
  • 积分528分
  • 威望53点
  • 贡献值0点
  • 好评度52点
  • 原创分0分
  • 专家分0分
地板#
发布于:2003-04-18 23:53


CreateDisposition -> pIrpStack->Parameters.Create.Options >> 24
nustzhua
驱动中牛
驱动中牛
  • 注册日期2002-06-19
  • 最后登录2015-09-27
  • 粉丝0
  • 关注0
  • 积分18分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2003-04-21 13:18
to vcmfc:
我发现IrpSp->Parameters.Create.Options 是如下说明的:
Specifies the options to be applied when creating or opening the file. These options are specified as a compatible combination of the following flags.
FILE_COMPLETE_IF_OPLOCKED

FILE_CREATE_TREE_CONNECTION

FILE_DELETE_ON_CLOSE

FILE_DIRECTORY_FILE

FILE_NO_EA_KNOWLEDGE

FILE_NO_INTERMEDIATE_BUFFERING

FILE_NON_DIRECTORY_FILE

FILE_OPEN_BY_FILE_ID

FILE_OPEN_FOR_BACKUP_INTENT

FILE_RANDOM_ACCESS

FILE_SEQUENTIAL_ONLY

FILE_SYNCHRONOUS_IO_ALERT

FILE_SYNCHRONOUS_IO_NONALERT

FILE_WRITE_THROUGH

而ZwCreateFile的CreationDisposition如下说明:
Specifies what to do, depending on whether the file already exists, as one of the following: CreateDispostion Values Meaning
FILE_SUPERSEDE If the file already exists, replace it with the given file. If it does not, create the given file.  
FILE_CREATE  If the file already exists, fail the request and do not create or open the given file. If it does not, create the given file.
FILE_OPEN  If the file already exists, open it instead of creating a new file. If it does not, fail the request and do not create a new file.
FILE_OPEN_IF If the file already exists, open it. If it does not, create the given file.
FILE_OVERWRITE If the file already exists, open it and overwrite it. If it does not, fail the request.
FILE_OVERWRITE_IF If the file already exists, open it and overwrite it. If it does not, create the given file.

好像你给的提示不太对啊。还有Options >> 24是不是有其他特殊的含义,如果是的,从哪儿可以找到?
不限容量的免费邮箱 www.k65.net
vcmfc
驱动中牛
驱动中牛
  • 注册日期2001-03-23
  • 最后登录2008-01-28
  • 粉丝0
  • 关注0
  • 积分528分
  • 威望53点
  • 贡献值0点
  • 好评度52点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2003-04-21 23:24


这不是明说的。也就是高24位以上放CreateDisposition ,24位以下放你所说的option.明白吗?
nustzhua
驱动中牛
驱动中牛
  • 注册日期2002-06-19
  • 最后登录2015-09-27
  • 粉丝0
  • 关注0
  • 积分18分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2003-04-22 09:27
谢谢vcmfc的解释。
不限容量的免费邮箱 www.k65.net
游客

返回顶部