阅读:2109回复:6
文件系统过滤驱动如何获得ZwCreateFile的参数CreationDisposition?
我的IRP_MJ_CREATE分派例程从何处获得ZwCreateFile的CreationDisposition?
它是在IO_STACK_LOCATION的Options里吗? |
|
沙发#
发布于: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 |
|
|
板凳#
发布于:2003-04-09 16:35
你看错了。我想得到的是ZwCreateFile的参数CreateDisposition。而不是IRP完成状态。
|
|
地板#
发布于:2003-04-18 23:53
CreateDisposition -> pIrpStack->Parameters.Create.Options >> 24 |
|
地下室#
发布于: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是不是有其他特殊的含义,如果是的,从哪儿可以找到? |
|
|
5楼#
发布于:2003-04-21 23:24
这不是明说的。也就是高24位以上放CreateDisposition ,24位以下放你所说的option.明白吗? |
|
6楼#
发布于:2003-04-22 09:27
谢谢vcmfc的解释。
|
|
|