How does a DCOM component know where to instantiate itself?

Answer Posted / guest

To create a remote instance of a script component, call the
CreateObject method, passing it the name of the remote
computer as a parameter.
If the remotable attribute of a script component's
<registration> element has been set to "true,"
the script component can be instantiated remotely from
another computer using Distributed COM (DCOM).

Both computers must have basic DCOM installed. Note The
ability to use CreateObject for instantiating remote script
components requires Visual Basic 6.0 or later or VBScript
5.0 or later.
The following Visual Basic example shows how to do this on
a computer named "myserver":

Set newS = CreateObject("Component.MyComponent", "myserver")
Note There can be a slight delay when you first
instantiate a remote script component while DCOM
establishes communication between the computers.

1. You can specify the machine on which you want to create
the remote server object in DCOM config ('dcomcnfg').

2. You can specify the machine name when instantiating the
remote server object. In C you can do this with a call to
CoGetClassObject or CoCreateInstanceEx (instead of
CoCreateInstance, which does not allow you to specify the
name of the machine).
In VB you can specify the name in one of the parameters in
the call to CreateObject

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you check whether a record is valid record or Invalid record using ADO control or Object?

1441


What is snapshot in vb?

524


What is the difference between Msgbox Statement and MsgboxQ function?

1444


Why doesn't "my string" & Chr$(13) do what I want?

1096


How about Access 2.0 compatibility?

1009






Data Control missing from toolbox when I use VB under NT3.5. Why?

926


Which language is used in visual basic?

487


Are there any examples of commercial applications built using Visual Basic?

1251


What is FireHouse Cursors?

1757


What is the latest version of visual basic?

457


What is ActiveX? Explain.

1453


How many objects resides in ADO ?

1506


how to make unlimited id(1rimjim,2rimjim,3rimjim....etc) login grp chat pogram for jabber?

1981


What is "Reserved Error -1209"?

1333


How do you make a TEXTBOX read only? Or, how do I prevent the user from changing the text in a TEXTBOX?

942