I am develop a minifilter to detect drag & drop file to harddisk. When user drag & drop file to drive:
But the size of file redirect_file_name.txt does not change.
I change source name to redirect_file_name.txt by this post
How can I do to change the size of file redirect_file_name.txt?
UPDATE: Use FltSetInformationFile with FileAllocationInformation
FILE_ALLOCATION_INFORMATION fileInformation;
fileInformation.AllocationSize.QuadPart = 1024;
status = FltSetInformationFile( FltObjects->Instance,
FltObjects->FileObject,
&fileInformation,
sizeof(FILE_ALLOCATION_INFORMATION),
FileAllocationInformation);
But status is 0XC000000D (STATUS_INVALID_PARAMETER)
Use these code at IRP_MJ_SET_INFORMATION (as said on Remarks)
FILE_ALLOCATION_INFORMATION fileInformation;
fileInformation.AllocationSize.QuadPart = 1024; // Size of file
status = FltSetInformationFile( FltObjects->Instance,
FltObjects->FileObject,
&fileInformation,
sizeof(FILE_ALLOCATION_INFORMATION),
FileAllocationInformation);
User contributions licensed under CC BY-SA 3.0