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 need of zorder method?

1 Answers  


What is the use of Hyperlink control for DHTML applications?

0 Answers  


How do you avoid the "Invalid use of null" error when reading null values from a database?

0 Answers  


What's the difference between MODAL and MODELESS forms?

0 Answers  


What is the need of tabindex property is label control?

0 Answers  






How would you view html code in Active Server Pages?

1 Answers  


how to validate the pop up window Example :assume there is an webpage in that webpage we had a button to browser or file to upload . how to validate this button if we click on that botton window should appear else back to the page i need in VB Script Code since i am using QTP for testing

1 Answers   Sapient,


what is the Difference between Recordset and Querydef?

0 Answers  


How does VB Pass arguments to a function by default?

2 Answers  


How do I get the number of free bytes on a disk?

0 Answers  


How do I mimic a toggle button?

0 Answers  


what are container objects?

1 Answers  


Categories