Click to See Complete Forum and Search --> : CreateObject function (DCOM)


Dan King
August 5th, 1999, 04:46 PM
We are doing a very interesting project using ActiveX to run remote agents, and we have run into a simple but difficult problem, illustrated below using Excel.

I would be very grateful if you have any ideas that could help us resolve our difficulty using ActiveX to create an object remotely. Thanks, Dan King

__________________________________________________

'Excel object created locally - works OK

Dim x as Object
Set x = CreateObject("Excel.Application")
__________________________________________________

'Excel object created locally, identifying server name - works OK

Dim x as Object
Set x = CreateObject("Excel.Application", "LocalHost")
__________________________________________________

'Excel object created remotedly - produces error:
'ActiveX unable to create object

Dim x as Object
Set x = CreateObject("Excel.Application", "MyServer")
__________________________________________________

Any idea why an object cannot be created on "MyServer"?

Huynh Quang Cuong
August 5th, 1999, 08:25 PM
Hello,
Did u use DCOMCNFG Utility to config Exel as a DCOM Server on 'MyServer'?
=========
H.Q.Cuong

Dan King
August 6th, 1999, 08:03 PM
I found the solution to this problem in in Microsoft NT bug report.
http://support.microsoft.com/support/kb/articles/q185/1/26.asp
Cause: This problem can occur if the ActiveX server is installed to a long
folder path that may conflict with a similar path on the computer.

They provide 3 useful fixes for the problem. Thanks.

Dan King
August 8th, 1999, 05:16 PM
The Microsoft bug report mentioned in my previous posting does not go far enough in providing a solution. In fact it deals only with creating an object locally.

I would appreciate any replies that help me with my problem, currently specified as follows:

>>>> We have compiled a remote server control (.OCX) in VB 6.0 and compared the registry with the .VBR file but the Class Name /ID does not show up in DCOMCNFG.EXE

Help please...

Huynh Quang Cuong
August 10th, 1999, 05:31 AM
Hello,
In process COM component can not be activated as Romote server except ActiveX DLL and MTS server. ActiveX Control is in process COM component so it can only run locally .It must be downloaded or installed on client machine before used.
Bye,
H.Q.Cuong