Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating proprietary files with Office like File/Propert
Message
De
06/12/2001 23:29:21
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00588210
Message ID:
00590979
Vues:
25
Sergey,

Thanks for this article. It describes exactly what we need to do. Unfortunately, it seems like a very complicated effort (OK, call me lazy<g>. I'm still holding out hope that there's a 3rd party product that serves as a wrapper for this type of interface. If I find such a beast, I will update this thread.

Thanks again for your help!
Malcolm



>Hi Malcolm,
>
>The following article discusses those WIN2K UI enhancements in details http://msdn.microsoft.com/msdnmag/issues/0300/w2kui/w2kui.asp
>
>>Our software stores its data in a proprietary file format. We are looking for a way to add a header to our proprietary data files so that our files have MS Office like file properties, i.e. the file properties that show up when you right click a file in Explorer or that get displayed in a tooltip type window in Windows 2000 when you hover your mouse over a file.
>>
>>Windows displays these properties if they're present and non-blank:
>>- Type
>>- Author
>>- Title
>>
>>Other commonly exposed MS Office type file properties:
>>- Subject
>>- Company
>>- Category
>>- Keywords
>>- Comments
>>- Hyperlink base
>>- Template
>>
>>Here are some ideas I have on how me might accomplish this. Your ideas and feedback appreciated!
>>
>>1. My guess(?) is that MS Office files expose their properties because they use Window's OLE storage system. Would it be possible to create a one char long Word document and use this file as a file header template to which we would append our data to the end. Given a legal file header, we could then use OLE API calls to change the value's of the Word header to match the content appended to the end of this header.
>>
>>I experimented by taking an empty Word document with property settings and renaming this file with another extension. Even after renaming the file's extension, all its properties were still visible to the Windows shell. The only thing that changed was the file's 'type' which corresponded to it's new file extension.
>>
>>2. Using the same '(ill)logic' as above, compile an 'empty' VFP EXE so we can fill in the EXE's file properties (title, version, copyright, etc.). This empty EXE file would serve as our file's header. We would then append our data to the end of this EXE header. Or is it possible to create a generic EXE (or other file extension type) header and then call specific API functions to update it's file properties? How do compilers embed this type of information into an executable? Could we just pad our file properties with a special filler character and then 'poke' in replacement characters (bypassing the Windows API). Yes, I know that's an UGLY technique - but it sounds like a technique none-the-less.
>>
>>Any feedback GREATFULLY appreciated!
>>
>>Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform