Retrieving File Summary Info?

Started by
3 comments, last by Nik02 17 years, 5 months ago
I'm using Win32 and C++, and I've been searching everywhere for the answer. I need to know how to get and set the file summary info (i.e. right click a file -> properties -> summary). I looked on msdn and all i can find is file attributes, which only cover Read Only, Archived, Hidden, etc. I would really appreciate it if you could help me out here. Thanks!
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Advertisement
I didn't think there was a sure-fire way to do this. The 'file summary information' isn't stored in the file itself as such, or in any database, but it determined by Windows on-the-fly, from the file's contents.

For example, if a file has extension '.exe', Windows will identify it as a PE file, and hence will search the PE header for the existence of a resource section, from which (if one's found) it will get most of its information.
Similarly, if it sees '.bmp', it'll check out the BITMAPFILEHEADER structure within, and relay information accordingly.

The point is that Windows needs to know the file's structure before it can produce a summary. Now I'm not sure on this, but I think it's possible to specify a means for Windows to summarise non-native file formats. This could potentially be done by registering a DLL to do all the work, but I'm just guessing. If I'm right about this, then what you're looking for is an interface to this cache of file-structure specifications.

It's possible that Win32 API provides such an interface, but I haven't heard of any such thing, and so you shouldn't count on its existence. I'm afraid I can suggest no more terms for you to search with.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Thanks for the info. If it is any help I'm trying to edit JPEG pictures. I have to include all the author, summary, subject, title, etc. for my yearbook class, and it is really boring to have to right click and manually do it on every picture, when all of them have several fields that will always be the same. I was planning on writing a program so that I could do it faster, since I can't select multiple pictures and then try to edit the summary info (which surprised me).
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Google for "secondary file streams msdn", you'll find lots of info.

The NTFS file system allows meta-files to exist along with "real" files, and given a "real" file handle, you can enumerate these files (aka secondary streams) and search for summary info by its guid.

Niko Suni

JPEG files include a specific metadata section called EXIF block; you can find its specification by googling also :)

Niko Suni

This topic is closed to new replies.

Advertisement