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 Data Form Wizard?

1734


How would you run your ActiveX Document Dll?

1663


Explain the usage of Web Browser Control?

1925


___ argument can be used to make a menuitem into bold.

1583


How would you navigate between one document to another document

1415


How much gain in performance will I get if I write my number crunching routines in C instead of Visual Basic?

1150


Explain Types of DBCombo boxes?

790


What is difference between datagrid and flexgrid?

13176


Explain the working with task in Gantt chart view.

846


How would you map properties to controls by using ActiveX Control Interface Wizard?

1996


Is it possible to Access BackEnd procedures?

1834


Explain the differences between ActiveX Dll and ActiveX Exe?

2293


Draw Sequence Modal of RDO? Explain.

1838


What is data control in vb?

774


Binary Access-method isused to access file in which manner?

1690