Re: Stream devices identification` by Max
Max
Mon Jul 07 17:59:54 CDT 2003
Objects created by different instances of enumerator are different objects,
so their IUnknown's are different. This is expected behavior. Their "display
names" should be identical though. And yes, the display name I am referring
to is returned by IMoniker::GetDisplayName.
Why do you use different enumerators anyway?
When you receive the "device changed" message, tear down all the graphs,
reinumerate the devices and rebuild the whole thing from scratch. Sure, it
takes some time, but it does not happen every minute, does it? I don't know
if it is practical for your case or not, but it is worth considering. If
not, use IMoniker::GetDisplayName. It should be sufficient for your needs.
-- Max.
"Andrey" <andrej_no@spam_telemed.lt> wrote in message
news:eEbUy3fQDHA.1072@TK2MSFTNGP10.phx.gbl...
> Hello, Max.
> Thank you for replay.
> IMoniker::GetDisplayName returned for example the follow string:
>
>
{"@device:pnp:\\?\pci#ven_8086&dev_24c5&subsys_a0021458&rev_02#3&13c0b0c5&0&
> fd#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\wave"}
>
> It is that are you talking about? Or I need to use another moniker method?
> Or I need to parse this string to get unique identificator?
>
> It seems that IUnknown interfaces created by different enumerations for
> the same device are not identical.
> --
> Andrey
>
> "Max Paklin" <mpaklin@hotmail.com> wrote in message
> news:eJ9TXTbQDHA.1988@TK2MSFTNGP12.phx.gbl...
> > QI returned IBaseFilter on IUnknown. IUnknown is known as an object
> > ideantity and should be equal for the same object no matter what
interface
> > was used to get IUknown from.
> >
> > Display friendly name may not work. What if you have two identical
> devices?
> > Why don't you use moniker name instead? It contains unique device ID and
> > that's all you need.
> >
>
>