Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX dll and DCOM?

DCOM faq link

ActiveX dll and DCOM?

by  Fursten  Posted    (Edited  )
If you make an ActiveX dll with Visual Basic and then if you register that dll in a server (the computer expected to run that dll) it seems you will have 2 problems:

1) It will not appear in DCOM config utility of the server computer

2) It will give you an error like this: Cannot create Activex Dll (in the client computer trying to call that dll)


How to solve this?

DCOM config will only show the entries for some kind of applications (ex.: ActiveX EXE). This is because after you register an ActiveX dll it will not be created in the registry an entry point like: AppID.

You will get that error in point 2 due to what I saied in point 1 and because you don¦t have in the registry something that says that the dll should run with a surrogate process (a process that only exist to suport that dll, putting it into a process)

How to solve this:

There are 2 ways:

1) Open the registry an put this entries by hand... Or

2) Open OLEVIEW and search for the class that you have inside your dll (object classes/all objects... MyDll.Myclass). After you have find it, in the right pane you will have some tabs. Click on the second tab (Implementation)In this tab says that it should work as a surrogate: use surrogate process (don¦t browse for a file that will be used to make that surrogate... windows will automatically use dllhost.exe for it... so leave it empty)

You are done.

Try to run the client again and call the server.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top