File Size

In my IRP_MN_QUERY_DIRECTORY handling, I ‘make up’ 5 files. I fill the appropriate information in the UserBuffer and return the appropriate values with STATUS_SUCCESS. Windows Explorer shows my five files, but files 2, 3, and 4 show size is 0. Files 1 and 5 show the size I returned in EndOfFile and AllocationSize in the FILE_BOTH_DIR_INFORMATION structure. What would cause this?

Thanks.

Jeff Nygren

Are you receiving a single directory enumeration call? Is it possible that
you are getting the SL_RETURN_SINGLE_ENTRY option on the first call but
returning multiple entries?

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@KrollOntrack.com [mailto:xxxxx@KrollOntrack.com]
Sent: Wednesday, May 21, 2003 2:34 PM
To: File Systems Developers
Subject: [ntfsd] File Size

In my IRP_MN_QUERY_DIRECTORY handling, I ‘make up’ 5 files. I fill the
appropriate information in the UserBuffer and return the appropriate values
with STATUS_SUCCESS. Windows Explorer shows my five files, but files 2, 3,
and 4 show size is 0. Files 1 and 5 show the size I returned in EndOfFile
and AllocationSize in the FILE_BOTH_DIR_INFORMATION structure. What would
cause this?

Thanks.

Jeff Nygren


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Here’s more info on this. If the file size is less than 4GB, the size is shown correctly. If 4GB or greater, file size is shown as 0, EXCEPT FOR MY FIRST FILE, which correctly shows size. (I’ve tested up to 8GB.)

Jeff Nygren

-----Original Message-----
From: Jeff Nygren
Sent: Wednesday, May 21, 2003 1:34 PM
To: ‘NT File Systems Developers’
Subject: File Size

In my IRP_MN_QUERY_DIRECTORY handling, I ‘make up’ 5 files. I
fill the appropriate information in the UserBuffer and return
the appropriate values with STATUS_SUCCESS. Windows Explorer
shows my five files, but files 2, 3, and 4 show size is 0.
Files 1 and 5 show the size I returned in EndOfFile and
AllocationSize in the FILE_BOTH_DIR_INFORMATION structure.
What would cause this?

Thanks.

Jeff Nygren

Aside from a bug in your filter, it could be caused by Explorer doing IRP_MJ_QUERY_INFORMATION to get the file size instead of using information returned by FindFirstFile etc.

xxxxx@KrollOntrack.com wrote:

In my IRP_MN_QUERY_DIRECTORY handling, I ‘make up’ 5 files. I fill the appropriate information in the UserBuffer and return the appropriate values with STATUS_SUCCESS. Windows Explorer shows my five files, but files 2, 3, and 4 show size is 0. Files 1 and 5 show the size I returned in EndOfFile and AllocationSize in the FILE_BOTH_DIR_INFORMATION structure. What would cause this?

Thanks.

Jeff Nygren


You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.