Quite simply, you can't do this with the type information. COM doesn't
require that a component publish in some sort of metadata that a type
implements a particular interface or not. Because of this, with simply a
Type instance, you can't determine if a component implements a COM
interface. In COM, you have to call QueryInterface and the component will
tell you if the interface is supported or not. The catch here is that the
call to QueryInterface requires the instantiation of the component, which
means you have to move beyond the Type instance.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>> <oddball....@gmail.com> wrote in message
>>
[quoted text clipped - 46 lines]
> skills - at least, as far as my mates go when I sit them down and make
> them hear all about my hours of hell at the hands of daemon of a model.
Oddball - 25 Feb 2008 18:37 GMT
On 25 Feb, 17:59, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
> Quite simply, you can't do this with the type information. COM doesn't
> require that a component publish in some sort of metadata that a type
[quoted text clipped - 59 lines]
> > skills - at least, as far as my mates go when I sit them down and make
> > them hear all about my hours of hell at the hands of daemon of a model.
That's not a problem!!! How? :)
Nicholas Paldino [.NET/C# MVP] - 25 Feb 2008 19:26 GMT
Oddball,
Well, if you want to create an instance given a Type, you can simply
pass the Type to the static CreateInstance method of the Activator class,
and then perform your checks against the instance (obj as IWhatever).

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> On 25 Feb, 17:59, "Nicholas Paldino [.NET/C# MVP]"
> <m...@spam.guard.caspershouse.com> wrote:
[quoted text clipped - 67 lines]
>
> That's not a problem!!! How? :)