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 Difference between Linked Object and Embedded Object?

2005


What are the rules which should be followed while naming a variable in VB?

775


Specify technical & functional architecture of your last 2 projects.

1835


How would you attach pictures in column headers of List View Control?

1903


How would you attach pictures in column headers of List View Control?

1896


Why can't I use an index with my VB accessed database?

1221


To populate a single column value which dbcontrols you to use?

1792


Which type of object requires this object?

1766


What is ActiveX Dll and ActiveX Exe?

1858


How can I change the printer Windows uses in code without using the print common dialog? How can I change orientation?

1294


How many ways you can access file using VB?

818


___ is a property to resize a label control according to your caption.

1321


Explain the usage of Web Browser Control?

1912


Is there any Edit method in ADO Data Access method?

1791


Explain the working with task in Gantt chart view.

836