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

What is the use of Visual Basic Document file?

1998


__ no of controls in form.

1233


What are the uses of List View Control?

1728


What is file in vb?

656


What is meant by Establish Connection in RDO?

1868






How would you add elements in TreevieW Control.

1802


Types of cursors in RDO.

1751


How many ways we can access file using VB?

1773


what are the different Types of Recordsets.

1812


What are the Internet tools available in VB 6.0?

2581


Whether HTML supports multimedia: and document links?

1651


What is ado data control in vb6 0?

855


What is the use of NEW Keyword? Explain.

1739


How many ways you can access file using VB?

784


How many tabs in a tabbed dialog do you consider appropriate?

1862