1

I am aware that we can create a COM object by using

Type t = Type.GetTypeFromProgID(progID);
object obj = Activator.CreateInstance(t);

But this requires a registry entry of the application of which we are trying to create the COM object.

Is there any possible way of creating a COM object without using windows registry entry, one of the use case can be creating a COM object of portable apps.

croxy
  • 4,082
  • 9
  • 28
  • 46
Prabhakar
  • 402
  • 6
  • 20
  • 3
    "Registration-Free COM", [StackOverflow](http://stackoverflow.com/search?q=Registration-Free+COM) and MSDN have some reading on the topic. – Roman R. Jan 28 '16 at 15:32
  • What Roman said. Specifically look at [this question](http://stackoverflow.com/questions/4542145/create-com-object-from-file-without-regsvr32) which redirects to [this MSDN article](https://msdn.microsoft.com/en-us/library/ms973913.aspx). – Chase Jan 28 '16 at 15:36
  • @Roman R and Chase could you please share an example code. Lets say I want to create a COM object of portable apps like eclipse. I looked at the MSDN article but was not able to implement it. Thank you – Prabhakar Feb 08 '16 at 17:22
  • @Prabhakar: [this blog post](http://alax.info/blog/1561) discusses a problem with Visual Studio built-in support for registration-free COM. You can skip the text, just locate the part "This simple solution `ComIsolation01`..." which gets you link to source code which implements regfree COM, build it in 32-bits and it will work. – Roman R. Feb 08 '16 at 17:32
  • @Roman R Thank you. Will check and let you know. – Prabhakar Feb 08 '16 at 19:16

0 Answers0