File Summary Info

Hi there,

Working with an NTFS based operating system, I'd like to link so-called "File Summary Information" with our R-Codes (and get the "Summary" tab when accessing the "properties" of a R-Code in the Windows Explorer... just like .DOC, .XLS,... files).

I've seen that we have to use these functions to achieve this:
stgCreateStorageEx (to create a "File Summary Information" structure);
stgOpenStorageEx (to access the structure);
SetFileSummaryInfo (to fill the structure with info).

Does anyone have yet "played" with these functions, or have any advice or sample I can use to set this up?

Thanks in advance,


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jurjen's picture

re: File Summary Info

Jared Middleton has posted something to PEG today that might be what you are looking for. His text is here: http://oehive.org/node/701


File Summary Info

Here we are...

First of all, you have to download, install and... debug the DSOFile.DLL provided by MS. Look at http://www.codecomments.com/message813451.html to achieve this.

Then, all you have to do is something like:

DEF VAR chDSOFile AS COM-HANDLE NO-UNDO.

CREATE "DSOFile.OleDocumentProperties":u chDSOFile.
chDSOFile:OPEN("c:\temp\test.txt":u, 0 /* 0 = Read/Write ; 1 = Read-Only */, 0 /* Default */).

chDSOFile:SummaryProperties:Author = "Me":u NO-ERROR.
chDSOFile:SummaryProperties:TITLE = "MyTitle":u NO-ERROR.
chDSOFile:SummaryProperties:SOURCE = "MySource":u NO-ERROR.
chDSOFile:SummaryProperties:comments = "MyComments":u NO-ERROR.

chDSOFile:SAVE(). /* Important! */
chDSOFile:CLOSE(0).

RELEASE OBJECT chDSOFile NO-ERROR.
chDSOFile = ?.

By opening the DLL in the ProTools' COM-Object VieWeR, you can look at the other methods and attributes, for instance the "CustomProperties" where you can define and set almost anything.