Jump to content
  • Advertisement
Sign in to follow this  
Cornstalks

Retrieving File Summary Info?

This topic is 4233 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
JPEG files include a specific metadata section called EXIF block; you can find its specification by googling also :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!