HI,guys:
i want to monitor the fileid changes on FAT filesystem,the fileid can be
changed when disk defragmenting,
and i register a callback on IRP_MJ_FILE_SYSTEM_CONTROL to filter
FSCTL_MOV_FILE,but FltQueryInformationfile failed
with STATUS_INVALID_PARAMETER, the code is:
FltQueryInformationFile(pFltObjects->Instance,pFltObjects->FileObject,&fileInternalInfo,sizeof(fileInternalInfo),FileInternalInformation,&lenReturned);
i also use FltPerformSynchronousIo to perform myself i/o,but still
failed,the code is:
ntRes = FltAllocateCallbackData(Instance, FileObject, &Data);
if(!NT_SUCCESS(ntRes))
{
KdPrint((“FltAllocateCallbackData Failed!!!\n”));
return ntRes;
}
Data->Iopb->MajorFunction = IRP_MJ_QUERY_INFORMATION;
Data->Iopb->IrpFlags = IRP_SYNCHRONOUS_API;
Data->Iopb->Parameters.QueryFileInformation.FileInformationClass =
FileInformationClass;
Data->Iopb->Parameters.QueryFileInformation.Length = Length;
Data->Iopb->Parameters.QueryFileInformation.InfoBuffer =
FileInformation;
FltPerformSynchronousIo(Data);
so anyone knows how can i get fileinformation in
PreFileSystemControl???Thanks alot!!!