通过FileHandle获取FileObject对象
<div id="wrap">
<!-- google_ad_section_start -->
NTSTATUS MyNtReadFile(<br>
IN HANDLE FileHandle,<br>
IN HANDLE Event,<br>
IN PIO_APC_ROUTINE ApcRoutine,<br>
IN PVOID ApcContext,<br>
OUT PIO_STATUS_BLOCK IoStatusBlock,<br>
OUT PVOID Buffer,<br>
IN ULONG Length,<br>
IN PLARGE_INTEGER ByteOffset,<br>
IN PULONG Key<br>
)<br>
{<br>
POBJECT_ATTRIBUTES ObjectAttributes;<br>
ObReferenceObjectByHandle(FileHandle,0, *IoFileObjectType,KernelMode,&ObjectAttributes,NULL);<br>
DbgPrint("ReadFile FilePath Is %ws\n",ObjectAttributes->ObjectName->Buffer);<br>
ObDereferenceObject(ObjectAttributes);<br>
OldReadFile(FileHandle,Event,ApcRoutine,ApcContext,IoStatusBlock,Buffer,Length,ByteOffset,Key);<br>
}<br>
<br>
用FileHandle获得文件名不应该使用ObReferenceObjectByHandle吗?蓝啊蓝啊蓝啊蓝
<!-- google_ad_section_end -->
<br>
</div>
POBJECT_ATTRIBUTES ObjectAttributes;
应该使用
PFILE_OBJECT vFileObject;
jpg改rar