How does a DCOM component know where to instantiate itself?



How does a DCOM component know where to instantiate itself?..

Answer / 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

More Visual Basic Interview Questions

what is the Advantage of ActiveX Dll over Active Exe ?

1 Answers  


Which controls have refresh method?

2 Answers   AB Inc, HCL,


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

0 Answers  


What is Database Connection pooling (relative to MTS)

1 Answers  


What is Seek Method which type of record set is available this?

0 Answers  






What is ActiveX Explain?

2 Answers   SDS,


Can any one please suggest which institute is providing Advance Excel & VBA Macros in Excel training in Hyderabad.

0 Answers  


Difference between Tabletype and Snapshot?

0 Answers  


What is the purpose of the DoEvents command?

2 Answers  


How would you create your application in DHTML?

0 Answers  


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

0 Answers  


What will happen if you issue a Resume statement after handling an error?

3 Answers  


Categories