File size mismatch

Hi All,

My minifilter is changing the file size first of all by writing some data
and then striping of the same data.

But applications like WINZIP and Visual are unable to zip or open those
files due to file size mismatch.It is because they are reading file size
from different location. The file size reported after file open
(IRP_MJ_QUERY_INFORMATION)does not match the file size in the directory
entry (IRP_MJ_QUERY_DIRECTORY).

Could anybody please help me how can I communicate my changed file size to
these Applications.I am in urgent need of this solution

Thanks in advance,

Ruhina

You’ll need to fix it in the directory entry
(IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY) so that the size of
the file does match the size of the directory entry.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in
Boston, MA April 18-21, 2006.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ruhina
Sent: Tuesday, March 21, 2006 12:27 AM
To: ntfsd redirect
Subject: [ntfsd] File size mismatch

Hi All,

My minifilter is changing the file size first of all by writing some
data and then striping of the same data.

But applications like WINZIP and Visual are unable to zip or open
those files due to file size mismatch.It is because they are reading
file size from different location. The file size reported after file
open (IRP_MJ_QUERY_INFORMATION)does not match the file size in the
directory entry (IRP_MJ_QUERY_DIRECTORY).

Could anybody please help me how can I communicate my changed file size
to these Applications.I am in urgent need of this solution

Thanks in advance,

Ruhina


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

But WINZIP doesn’t catch IRP_MJ_DIRECTORY_CONTROL at all.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Tuesday, March 21, 2006 6:24 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] File size mismatch

You’ll need to fix it in the directory entry
(IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY) so that the size of the
file does match the size of the directory entry.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in Boston,
MA April 18-21, 2006.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of ruhina
Sent: Tuesday, March 21, 2006 12:27 AM
To: ntfsd redirect
Subject: [ntfsd] File size mismatch

Hi All,

My minifilter is changing the file size first of all by writing some data
and then striping of the same data.

But applications like WINZIP and Visual are unable to zip or open those
files due to file size mismatch.It is because they are reading file size
from different location. The file size reported after file open
(IRP_MJ_QUERY_INFORMATION)does not match the file size in the directory
entry (IRP_MJ_QUERY_DIRECTORY).

Could anybody please help me how can I communicate my changed file size to
these Applications.I am in urgent need of this solution

Thanks in advance,

Ruhina


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi;
If you just want to set the file size why not use ZwSetInformationFile.

Thanks & Regards
Faraz

On 3/20/06, ruhina wrote:
> Hi All,
>
>
>
> My minifilter is changing the file size first of all by writing some data
> and then striping of the same data.
>
> But applications like WINZIP and Visual are unable to zip or open those
> files due to file size mismatch.It is because they are reading file size
> from different location. The file size reported after file open
> (IRP_MJ_QUERY_INFORMATION)does not match the file size in the directory
> entry (IRP_MJ_QUERY_DIRECTORY).
>
>
>
> Could anybody please help me how can I communicate my changed file size to
> these Applications.I am in urgent need of this solution
>
>
>
> Thanks in advance,
>
> Ruhina
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Could you elaborate a more on this? Currently I am trapping
IRP_MJ_DIRECTORY_CONTROL and changing EndOfFile.LowPart member of
FILE_STANDARD_INFORMATION structure.

However, this call is not trapped by my mini filter when the file is being
zipped by right clicking on the file and doing an Add to zip. Also, does the
EndOfFile.LowPart member denote the file size?

Thanks in advance,

Ruhina


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Tuesday, March 21, 2006 6:24 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] File size mismatch

You’ll need to fix it in the directory entry
(IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY) so that the size of the
file does match the size of the directory entry.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in Boston,
MA April 18-21, 2006.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of ruhina
Sent: Tuesday, March 21, 2006 12:27 AM
To: ntfsd redirect
Subject: [ntfsd] File size mismatch

Hi All,

My minifilter is changing the file size first of all by writing some data
and then striping of the same data.

But applications like WINZIP and Visual are unable to zip or open those
files due to file size mismatch.It is because they are reading file size
from different location. The file size reported after file open
(IRP_MJ_QUERY_INFORMATION)does not match the file size in the directory
entry (IRP_MJ_QUERY_DIRECTORY).

Could anybody please help me how can I communicate my changed file size to
these Applications.I am in urgent need of this solution

Thanks in advance,

Ruhina


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

> But WINZIP doesn’t catch IRP_MJ_DIRECTORY_CONTROL at all.

(confused) Winzip is not supposed to catch IRP_MJ_DIRECTORY_CONTROL,
it’s an application, not a filter driver.

Could you elaborate a more on this? Currently I am trapping
IRP_MJ_DIRECTORY_CONTROL and changing EndOfFile.LowPart member
of FILE_STANDARD_INFORMATION structure.

(confused) IRP_MJ_DIRECTORY control does not use
FILE_STANDARD_INFORMATION, but one of these

FILE_BOTH_DIR_INFORMATION
FILE_DIRECTORY_INFORMATION
FILE_FULL_DIR_INFORMATION
FILE_ID_BOTH_DIR_INFORMATION
FILE_ID_FULL_DIR_INFORMATION
FILE_NAMES_INFORMATION
FILE_OBJECTID_INFORMATION

Do you actually know what are you doing ?
From your posts, I sense your skill in FS filters is not sufficient enough
for writing data modification filter (IIRC you are trying to develop one).

I understand that everyone was once a beginner, but you should study
a book about file systems and/or IFS documentation before you will
try to develop something.

L.

Sorry that was not what I intended to say. While typing I mixed up between
IRP_MJ_DIRECTORY_CONTROL and IRP_MJ_QUERY_INFORMATION.

The problem that I have is ,my minifilter does not receive
IRP_MJ_DIRECTORY_CONTROL while the file is being zipped by Winzip.

The file size on disk is different from what Winzip reads .How do I go
about this.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Tuesday, March 21, 2006 8:00 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] File size mismatch

But WINZIP doesn’t catch IRP_MJ_DIRECTORY_CONTROL at all.

(confused) Winzip is not supposed to catch IRP_MJ_DIRECTORY_CONTROL,
it’s an application, not a filter driver.

Could you elaborate a more on this? Currently I am trapping
IRP_MJ_DIRECTORY_CONTROL and changing EndOfFile.LowPart member
of FILE_STANDARD_INFORMATION structure.

(confused) IRP_MJ_DIRECTORY control does not use
FILE_STANDARD_INFORMATION, but one of these

FILE_BOTH_DIR_INFORMATION
FILE_DIRECTORY_INFORMATION
FILE_FULL_DIR_INFORMATION
FILE_ID_BOTH_DIR_INFORMATION
FILE_ID_FULL_DIR_INFORMATION
FILE_NAMES_INFORMATION
FILE_OBJECTID_INFORMATION

Do you actually know what are you doing ?

From your posts, I sense your skill in FS filters is not sufficient enough

for writing data modification filter (IIRC you are trying to develop one).

I understand that everyone was once a beginner, but you should study

a book about file systems and/or IFS documentation before you will

try to develop something.

L.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

How about a network open fastio call? That will query file length but
you’ll not see a MJ_CREATE or a MJ_QUERY_INFORMATION…

Hi all,

In my following code in IRP_MJ_DIRECTORY_CONTROL
pudtDirectoryInformation->EndOfFile->QuadPart is not returning my file
size.I am changing my file size by manipulating this data.

PFILE_BOTH_DIR_INFORMATION pudtDirectoryInformation =
NULL;

if(IRP_MN_QUERY_DIRECTORY == Data->Iopb->MinorFunction)

{

if(FileBothDirectoryInformation ==
Data->Iopb-Parameters.DirectoryControl.QueryDirectory.FileInformationClass)

{

pudtDirectoryInformation =
Data->Iopb->Parameters.DirectoryControl.QueryDirectory.DirectoryBuffer;

}

}

Kindly let me know if I am doing anything wrong here .I think
pudtDirectoryInformation structure is not filled properly as
Data->Iopb-Parameters.DirectoryControl.QueryDirectory.Length is showing
different value than

Sizeof(FILE_BOTH_DIRECTORY_INFORMATION).

Thanks and regards,

Ruhina


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Tuesday, March 21, 2006 6:24 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] File size mismatch

You’ll need to fix it in the directory entry
(IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY) so that the size of the
file does match the size of the directory entry.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in Boston,
MA April 18-21, 2006.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of ruhina
Sent: Tuesday, March 21, 2006 12:27 AM
To: ntfsd redirect
Subject: [ntfsd] File size mismatch

Hi All,

My minifilter is changing the file size first of all by writing some data
and then striping of the same data.

But applications like WINZIP and Visual are unable to zip or open those
files due to file size mismatch.It is because they are reading file size
from different location. The file size reported after file open
(IRP_MJ_QUERY_INFORMATION)does not match the file size in the directory
entry (IRP_MJ_QUERY_DIRECTORY).

Could anybody please help me how can I communicate my changed file size to
these Applications.I am in urgent need of this solution

Thanks in advance,

Ruhina


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Kindly let me know if I am doing anything wrong here .I think pudtDirectoryInformation

structure is not filled properly as Data->Iopb-Parameters.DirectoryControl.QueryDirectory.Length
is showing different value than Sizeof(FILE_BOTH_DIRECTORY_INFORMATION).

FILE_BOTH_DIR_INFORMATION is structure that has variable length.

L.