Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DCOM

0 views
Skip to first unread message

John Wright

unread,
Dec 3, 2003, 5:16:06 PM12/3/03
to
When I am developing a program in VB and I reference COM objects on remote
servers why does VB pull the dll into my program when I compile it. Doesn't
this defeat the purpose of DCOM. I want to develop a program that uses a
COM object registered in COM+ on my COM server without having to compile it
into my system when I do a package and deploy. If I try to run the exe file
on a box without doing the install, I get the error "cannot create ActiveX
object". Currently we are using Remoting to create the objects, but I would
prefer to use straigt DCOM.

Questions:

1. Is it possible to create an ActiveX.dll compile it on a remove machine
and register it in COM+ without having to copy the DLL locally in the
package and deploy
2. If yes, how?

Thanks.

john


Tony Proctor

unread,
Dec 4, 2003, 5:35:54 AM12/4/03
to
Not sure what you mean by "...pull the dll into my program when I compile
it" John. If the DLL is in your References then you must have added
yourself, or am I missing something.

You can use the CreateObject() function to create a remote instance of an
object. You can use dcomcnfg.exe to set the name of the remote machine, or
it can be specified as the 2nd argument to the call, e.g.

Set oDear = CreateObject (ProgID, MachineName)

You can use late binding in your code (i.e. Dim oDear As Object), or you can
reference an appropriate type library (usually the DLL)

Either way, the DLL/type library has to be registered locally or you'll get
"Class not registered locally" errors. COM uses this local information to
resolve the ProgID and then marshall the remote object.

A common problem during development, where 'project' compatibility is the
norm rather than 'binary' compatibility, is that the DLL is registered on
the two machines with different IDs. You then get the very generic error
"ActiveX component can't create object". This specific situation is usually
identifiable because it generates event-log entries on the "client" machine.

Tony Proctor

"John Wright" <rileyx...@hotmail.com> wrote in message
news:Owx$LseuDH...@TK2MSFTNGP09.phx.gbl...

0 new messages