简体   繁体   中英

read write file properties with PropertyHandler Shell Extension

I'm trying to create PropertyHandler shell extension. What's the best way for embedding properties like (Title,Author,.....) to use the same file in multi computers or devices? StgCreateStorageEx? way or there is other ways to do it? because StgCreateStorageEx dealing with NTFS files only and i'm not sure if the file hold these properties with it if i open it in other device with same PropertyHandler

Is there any way to save properties inside the my file?

The StgCreateStorageEx function creates a new storage object using the IStorage interface. This allows storing multiple data objects within a single binary file, see for example https://en.wikipedia.org/wiki/COM_Structured_Storage . So, technically, you can save almost anything in this file including embedded properties.

I don't think that this is limited to NTFS: The old Microsoft Office.doc format (and many other Microsoft products) use this storage format and work also with FAT32.

If you want to use this binary file format is a completely different question. As you did not provide any information about the content and format of your file, I cannot recommend anything. One alternative would be to store the content of your file in an xml file. Properties like Title and Author then could be added easily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM