Question

I'd like to create a new stub file "test.mp3" for instance, and add a Window Property to it ( System.Author for instance).

the solution must be usable for several file extension as text, picture, videos, etc...

If I just create a file and use IShellItem2::GetPropertyStore I get a HRESULT fail for invalid Arguments.

Use IShellItem2::GetPropertyStore on a real music file I can read and write Its properties just fine.

Please test your suggestions first.

Was it helpful?

Solution

Property Stores typically access and store data within the file itself. In your case of a mp3 file, it would be attempting to read and write the ID3 tags. Also, Property Stores are not stored in a database and cannot be arbitrarily added to files that don't support it.

You'll most likely need to implement your own property handlers to do what it appears you're trying to accomplish. For types that already have handlers, you'll have to replace the system handlers with your own.

The most likely reason your mp3 test is failing is that you have an empty file with no data and no valid ID3 tags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top