等效于运行SomeActiveX.Exe/regserver的API [英] API Equivalent of running SomeActiveX.Exe /regserver
问题描述
我需要以编程方式注册ActiveX exe,而Shell(SomeActiveX.Exe/regserver)不够.有人知道等效的API吗?
您可以使用 VB6示例.
要注册进程外COM对象,事情会变得很棘手.请参见公开ActiveX对象. Hello Sample显示了一些选项. 拉里·奥斯特曼(Larry Osterman)为此事发了邮件,以获取背景信息./p>
通常,如果您需要对EXE执行此操作,则对* .EXE/regserver进行炮击会容易得多.
I need to register an ActiveX exe programmatically and Shell(SomeActiveX.Exe /regserver) is not sufficient. Is anyone aware of an API equivalent?
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.
这篇关于等效于运行SomeActiveX.Exe/regserver的API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!