Re[2]: Re[2]: Getting file metainformation from NTFS

> Ok… I found it out that those informations are stored in an

alternate stream named SummaryInformation…

Interesting. I made an experiment with querying
FileStreamInformation on one of the DOC files where I have
written additional summary in MS Word, and the file
has default data stream only.

So either your source is wrong or I have hallucinations :slight_smile:

Anyway you can query the alternate streams using
NtQueryInformationFile with FileStreamInformation,
although I still insist it will not work your purpose.

L.

> > Ok… I found it out that those informations are stored in an

> alternate stream named SummaryInformation…

Interesting. I made an experiment with querying
FileStreamInformation on one of the DOC files where I have
written additional summary in MS Word, and the file
has default data stream only.

So either your source is wrong or I have hallucinations :slight_smile:

Correct, these things work on FAT where there is no alternate data streams.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

OK… why is everyone talking only about Office files… yes… the idea for a summary information came from office files, but microsoft made it general for every file with NTFS. I’m only interested in accessing this generally… yes, for office files it works differently, because windows can access the information stored inside the files, and therefor office files do not have alternate data streams for storing this metadata.
My question was how can I access the keywords metainformation tag from any file… because every file on an NTFS volume has it, if there are any non-empty fields in the summary information tab, and if the summaryinformation alternate data stream is not corrupt.

xxxxx@gmail.com wrote:

OK… why is everyone talking only about Office files… yes… the idea for a summary information came from office files, but microsoft made it general for every file with NTFS. I’m only interested in accessing this generally… yes, for office files it works differently, because windows can access the information stored inside the files, and therefor office files do not have alternate data streams for storing this metadata.
My question was how can I access the keywords metainformation tag from any file… because every file on an NTFS volume has it, if there are any non-empty fields in the summary information tab, and if the summaryinformation alternate data stream is not corrupt.

For a start most files won’t have them, as shown by others (including
those who actually write filesystems, and I’d tend to believe them), and
secondly the format is not documented. Others have already shown that
that information is in fact in two streams, one of which is GUID name.

In userspace you call StgOpenStorageEx and return an
IPropertySetStorage. Duplicating that in kernel space in a way that is
(a) compatible with all operating systems and filesystems, and (b)
doesn’t become a hackfest as each new service pack changes something, is
no small task.

Personally I’d forget it and find a different solution.

Tony

Thank you for your replies

Thank you Tony for your answer

For a start most files won’t have them, as shown by others (including those who actually write >filesystems, and I’d tend to believe them)
I would really like to believe them, but I have to decide to believe them or my eyes… because if i choose any file from my PC on NTFS, it has the summary tab…and yes… until it is empty for non-Office files, the file does not have any Alternate Data Streams, but if you set a metatag like author or comments, the three ADS-es (DocumentSummaryInformation, SummaryInformation, and the one with the GUID) are created… or at least that’s what I can see. And I’m not the only one, I’ve asked some friends to check it out on their PCs, and the summary tab exists for every file

In userspace you call StgOpenStorageEx and return an IPropertySetStorage. Duplicating that in >kernel space in a way that is (a) compatible with all operating systems and filesystems, and (b) >doesn’t become a hackfest as each new service pack changes something, is no small task.

Does this mean, that I will not be able to call StgOpenStorageEx from my kernel-mode filter driver?

About compatibility… my goal is to write a filter driver for NTFS , so it does not really have to be compatible with other filesystems, and about OS-s… NTFS 5.0 works since Windows 2000 (I hope i’m not wrong at this too), so there are some OS-s that won’t support it… but for me it would be enough if it would work for XP with SP2 on my PC

Personally I’d forget it and find a different solution.
The reason why I have chosen this way is because I have thought it would be nice to do it this way because the other solutions of associating keywords to every file (popping a dialog with text input at every file creation/copy or creating a new tab in Properties) would be I think of the same difficulty as this, at least in my opinion. But if you happen to know about how to create a properties tab, plz let me know, cause I did not find anything like this.

Plz forgive me everybody for posting dumb questions, but I’m a rookie… I’ll try not to post dumb questions anymore, but I will not cease to post, 'cause here I can get help very fast (because of you…), and I can’t get FileSystemDevelopment related help anywhere else… so thank you again, I have learnt many things since my first post(one day ago)

Read the FAQ first. Obtain the only book ever printed about file systems.
Print and read every page in the WDK from the Installable File Systems part.
Obtain at least 5 years of experience in writing Windows NT, 2000, XP, 2003,
& Vista device drivers for other stacks including hardware and pure software
only drivers.

Run Sfilter when using Word to create a simple document on a FAT and NTFS
filesystem. Look at them with your favorite ‘properties’ viewer. Try other
file types. Plan to dedicate two years of full time working on this
project. There is a course in file systems and filters given by OSR, so
this group is not the only source.

Did you look in the WDK for StgOpenStorageEx? Did you look at the
requirements for that call in MSDN Library?

Client Requires Windows Vista, Windows XP, or Windows 2000
Professional.
Server Requires Windows Server “Longhorn”, Windows Server 2003, or
Windows 2000 Server.
Header Declared in Objbase.h.

Library Use Ole32.lib.

DLL Requires Ole32.dll.

The last time I heard about it, ole32.dll is some object oriented Windows
run-time library. If it has a 32 in it, it is almost never accessible from
a kernel mode driver. You need to read, practice on samples, and do a lot
of thinking before you get anywhere near writing code in the kernel and
especially in the file system stack.


David J. Craig
Engineer, Sr. Staff Software Systems
Broadcom Corporation

wrote in message news:xxxxx@ntfsd…
> Thank you for your replies
>
> Thank you Tony for your answer
>>For a start most files won’t have them, as shown by others (including
>>those who actually write >filesystems, and I’d tend to believe them)
> I would really like to believe them, but I have to decide to believe them
> or my eyes… because if i choose any file from my PC on NTFS, it has the
> summary tab…and yes… until it is empty for non-Office files, the file
> does not have any Alternate Data Streams, but if you set a metatag like
> author or comments, the three ADS-es (DocumentSummaryInformation,
> SummaryInformation, and the one with the GUID) are created… or at least
> that’s what I can see. And I’m not the only one, I’ve asked some friends
> to check it out on their PCs, and the summary tab exists for every file
>
>>In userspace you call StgOpenStorageEx and return an IPropertySetStorage.
>>Duplicating that in >kernel space in a way that is (a) compatible with all
>>operating systems and filesystems, and (b) >doesn’t become a hackfest as
>>each new service pack changes something, is no small task.
>
> Does this mean, that I will not be able to call StgOpenStorageEx from my
> kernel-mode filter driver?
>
> About compatibility… my goal is to write a filter driver for NTFS , so
> it does not really have to be compatible with other filesystems, and about
> OS-s… NTFS 5.0 works since Windows 2000 (I hope i’m not wrong at this
> too), so there are some OS-s that won’t support it… but for me it would
> be enough if it would work for XP with SP2 on my PC
>
>>Personally I’d forget it and find a different solution.
> The reason why I have chosen this way is because I have thought it would
> be nice to do it this way because the other solutions of associating
> keywords to every file (popping a dialog with text input at every file
> creation/copy or creating a new tab in
> Properties) would be I think of the same difficulty as this, at least in
> my opinion. But if you happen to know about how to create a properties
> tab, plz let me know, cause I did not find anything like this.
>
> Plz forgive me everybody for posting dumb questions, but I’m a rookie…
> I’ll try not to post dumb questions anymore, but I will not cease to post,
> 'cause here I can get help very fast (because of you…), and I can’t get
> FileSystemDevelopment related help anywhere else… so thank you again, I
> have learnt many things since my first post(one day ago)
>
>
>
>