Click to See Complete Forum and Search --> : CoCreateInstance without new


xs2ahmed
July 3rd, 2006, 07:10 AM
Hi,
I wanna get make a cocreateinstance call on a managed Component which implemenets a given interface say IMyInterface,..
i can do it like

IMyinterface interface=new MyNamesapce.MyInterfaceImplementaionClass();
and then use interface to call methods,...

Now i have to do it throgh another way, now i have more than one components that implelemt MyInterface, so instead of adding references to all of them ,..i wanna instantiate a component whose GUID i have dynamically obtained some way the component(s) implement IMyInterface,...

how can i do it in C# or managed C++ without new....
thanks in Adv