cmsjr
cmsjr

Reputation: 59225

API Equivalent of running SomeActiveX.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?

Upvotes: 2

Views: 1247

Answers (2)

Reed Copsey
Reed Copsey

Reputation: 564801

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.

Upvotes: 3

zoidbeck
zoidbeck

Reputation: 4151

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

Shell(SomeActiveX.Exe /regserver)
Shell(regsvr32 SomeActiveX.Exe)

Upvotes: -1

Related Questions