(COM): Right now I just read the registry entry to determine FriendlyName from a CLSID GUID. Is there a way to get the FriendlyName with an API? I tried class monikers and IPropertyBag, but it seems not everything has IPropertyBag with "FriendlyName" as a property? (Though it looks like everything does have "CLSID" if it has IPropertyBag.) But browsing through OLEView even not everything has IPropertyBag either. I thought this was the official way to enumerate DirectShow filters? What gives?
(#define): And what kind of a define would I need to do the below (excluding declares) about 6 times? I'd need to specify what is concatenated to tmp (SourceFilter for the first), then what is printed in cout, and that's it. It would go like VideoDecoder, VideoDecoderFriendlyName, "Video Decoder" for the second one. So how would I make a multi-line define to replace all that code yet still have the flexibility to change the individual components of that code that I need to?
I would put in my main sub:
DoFriendlyName(SourceFilter,SourceFilterFriendlyName,"Source Filter");
DoFriendlyName(VideoDecoder,VideoDecoderFriendlyName,"Video Decoder");
//...etc
And just that one line per object would handle its error outputting and whatever else. Would that be possible?
(#define): And what kind of a define would I need to do the below (excluding declares) about 6 times? I'd need to specify what is concatenated to tmp (SourceFilter for the first), then what is printed in cout, and that's it. It would go like VideoDecoder, VideoDecoderFriendlyName, "Video Decoder" for the second one. So how would I make a multi-line define to replace all that code yet still have the flexibility to change the individual components of that code that I need to?
I would put in my main sub:
DoFriendlyName(SourceFilter,SourceFilterFriendlyName,"Source Filter");
DoFriendlyName(VideoDecoder,VideoDecoderFriendlyName,"Video Decoder");
//...etc
And just that one line per object would handle its error outputting and whatever else. Would that be possible?