API Equivalent of running SomeActiveX.Exe /regserver

依然范特西╮ 提交于 2019-12-06 13:32:25

You can use DllRegisterServer to register a COM component programatically, if it's an in-process com object. Here is a VB6 example on MSDN.

To register an out of process COM object, things get tricky. See Exposing ActiveX Objects. The Hello Sample shows some of the options. Larry Osterman blogged about this for background info.

In general, if you need to do this to an EXE, shelling out to *.EXE /regserver will be much easier.

You could try using regsvr32 also. This should be sufficient:

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