I apologize if this is a rudimentary question, but for some reason I haven't been able to find the answer with my searches.
Let's say you have an IShellItemArray
, and for each IShellItem
in the array, you want to determine the item's associated application or general file type. For example, the item may be a Microsoft Word document, Excel document, PDF, image, etc. I was wondering what the most efficient way to do this is.
It seems like getting the path and then the file extension wouldn't be ideal, as you'd have to potentially compare it to many different extensions for any given application.
Is this a job for IQueryAssociations
? And perhaps more specifically, IQueryAssociations::GetString
? I know you can obtain that interface through IShellItem::BindToHandler
.
And should I be looking for an application string, or instead perhaps a CLSID associated with the program? Thanks a million for any help.
question from:
https://stackoverflow.com/questions/65941516/determining-an-ishellitems-file-type-associated-application 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…