Register a C#/VB.NET COM dll programmatically

前端 未结 2 388
春和景丽
春和景丽 2020-12-05 11:10

Question: I have a .NET dll which I use from a C++ program. Now I have to register the dll programmatically on a deployment computer.

How do I do that (programmatica

相关标签:
2条回答
  • 2020-12-05 11:44

    YUK, .NET dlls don't have DllRegisterServer, so you have to write a .NET installer, executing this somewhere:

    Assembly asm = Assembly.LoadFile (@"c:\temp\ImageConverter.dll");
    RegistrationServices regAsm = new RegistrationServices();
    bool bResult = regAsm.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase);
    
    0 讨论(0)
  • 2020-12-05 11:50

    Can you use process monitor to see what system changes (basically registry changes I think) are made when you use regasm.exe to register your dll, and then make those changes programatically instead?

    0 讨论(0)
提交回复
热议问题