Register a C#/VB.NET COM dll programmatically

爱⌒轻易说出口 提交于 2019-11-27 20:10:55

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);

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?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!