开发者

How do I get details from File Properties? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Read/Write 'Extended' file properties (C#)

Does anyone know how to get the information contained in the Details tab of a File's properties window? Any .NET library I'm overlooking?

This is the window/information I'm talking about:

How do I get details from File Properties? [duplicate]

It seems like there would be a better way to access these data rather than having to employ various methods to extract metadata of various file types, since there's certainly some overlap on the categories of information available under this tab, even for different file types. But search as I might, I haven't come across anyone wanting to do this for any (or many) file types -- quite a few discussions on grabbing metadata for specific file types though.

Any suggestions you m开发者_StackOverflow中文版ay have would be most welcome :)


Well, this is not completely impossible. You need to pinvoke SHCreateItemFromParsingName() to obtain an IShellItem2 interface pointer so you can call its GetProperty() method. To get this going in C# is however quite brutal. The shell interfaces are in the domain of native C++, the only language in which you can get the COM declarations and guids you need to bring this to a good end. After 4 major releases of .NET, we're still no closer to make shell programming in a managed language any easier. Good keywords to google for though, somebody somewhere made this work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜