FSCTL_GET_RETRIEVAL_POINTERS problem...

Hi,
I create a file (on WinXP) using CreateFile/SetFilePointer/SetEndOfFile.
Then I am trying to determine its location using
FSCTL_GET_RETRIEVAL_POINTERS. In this case, the file location is reported
incorrectly. The same FSCTL_GET_RETRIEVAL_POINTERS code works ok with the
existing file, any ideas?

Thanks

Hello Vladimir,

I have seen similar problem but I am not sure whether it applies here…
I created a file with some preallocation size. Then I queried the LCN-VCN
mapping using the get FSCTL_GET_RETRIEVAL_POINTERS. It gave me correct
(some) values, but once I closed the handle and reopened it, the LCN-VCN
mapping were lost.
Also it failed for FAT.

So the workaround which I tried was to create the file, and then set the end
of file (which you already seem to be doing) using
ZwSetInformatioFile/FileEndofFileInformation and then use FSTL_GET… to get
the LCN-VCN mapping and it worked correctly in both FAT as well as NTFS
case.

Just to note I was doing this from kernel mode.

thanks
-Kiran

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Vladimir
Sent: Monday, December 08, 2003 4:00 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FSCTL_GET_RETRIEVAL_POINTERS problem…

Hi,
I create a file (on WinXP) using CreateFile/SetFilePointer/SetEndOfFile.
Then I am trying to determine its location using
FSCTL_GET_RETRIEVAL_POINTERS. In this case, the file location is reported
incorrectly. The same FSCTL_GET_RETRIEVAL_POINTERS code works ok with the
existing file, any ideas?

Thanks


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

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