DCOM componant 
Author Message
 DCOM componant

I see alot of information pertaining to setting up a DCOM componant on the
server.  I can do that.

But how do you access this componant from the client.  The only way I can
see is through late binding with the CreateObject method and specifying a
server name.  I dont think this is even supported in VB5.

How can you do it with early binding.  How to you get a reference to a
remote DCOM componant?

What are the advantages of DCOM this way over MTS?



Mon, 20 Oct 2003 23:23:47 GMT  
 DCOM componant
You can do it; you need a local typelib or copy of the component installed
to get early bind information from. In VB6, CreateObject has a second
parameter as a server name; from VB5 you have to call CoCreateInstanceEx and
specify your server there. There's an MSKB Q article about this that is
quite helpful IIRC - search for CreateObjectEx and I think you'll find it...

Paul.


Quote:
> I see alot of information pertaining to setting up a DCOM componant on the
> server.  I can do that.

> But how do you access this componant from the client.  The only way I can
> see is through late binding with the CreateObject method and specifying a
> server name.  I dont think this is even supported in VB5.

> How can you do it with early binding.  How to you get a reference to a
> remote DCOM componant?

> What are the advantages of DCOM this way over MTS?



Mon, 20 Oct 2003 23:42:17 GMT  
 DCOM componant
How does the VB app know to access the componant remotely if the typelib is
local....


Quote:
> You can do it; you need a local typelib or copy of the component installed
> to get early bind information from. In VB6, CreateObject has a second
> parameter as a server name; from VB5 you have to call CoCreateInstanceEx
and
> specify your server there. There's an MSKB Q article about this that is
> quite helpful IIRC - search for CreateObjectEx and I think you'll find
it...

> Paul.



> > I see alot of information pertaining to setting up a DCOM componant on
the
> > server.  I can do that.

> > But how do you access this componant from the client.  The only way I
can
> > see is through late binding with the CreateObject method and specifying
a
> > server name.  I dont think this is even supported in VB5.

> > How can you do it with early binding.  How to you get a reference to a
> > remote DCOM componant?

> > What are the advantages of DCOM this way over MTS?



Mon, 20 Oct 2003 23:58:17 GMT  
 DCOM componant
Because you explicitly specify the server name in your call to
CoCreateInstanceEx...

http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

Paul.


Quote:
> How does the VB app know to access the componant remotely if the typelib
is
> local....



> > You can do it; you need a local typelib or copy of the component
installed
> > to get early bind information from. In VB6, CreateObject has a second
> > parameter as a server name; from VB5 you have to call CoCreateInstanceEx
> and
> > specify your server there. There's an MSKB Q article about this that is
> > quite helpful IIRC - search for CreateObjectEx and I think you'll find
> it...

> > Paul.



> > > I see alot of information pertaining to setting up a DCOM componant on
> the
> > > server.  I can do that.

> > > But how do you access this componant from the client.  The only way I
> can
> > > see is through late binding with the CreateObject method and
specifying
> a
> > > server name.  I dont think this is even supported in VB5.

> > > How can you do it with early binding.  How to you get a reference to a
> > > remote DCOM componant?

> > > What are the advantages of DCOM this way over MTS?



Tue, 21 Oct 2003 00:26:56 GMT  
 DCOM componant
I am talking about early binding?


Quote:
> Because you explicitly specify the server name in your call to
> CoCreateInstanceEx...

> http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

> Paul.



> > How does the VB app know to access the componant remotely if the typelib
> is
> > local....



> > > You can do it; you need a local typelib or copy of the component
> installed
> > > to get early bind information from. In VB6, CreateObject has a second
> > > parameter as a server name; from VB5 you have to call
CoCreateInstanceEx
> > and
> > > specify your server there. There's an MSKB Q article about this that
is
> > > quite helpful IIRC - search for CreateObjectEx and I think you'll find
> > it...

> > > Paul.



> > > > I see alot of information pertaining to setting up a DCOM componant
on
> > the
> > > > server.  I can do that.

> > > > But how do you access this componant from the client.  The only way
I
> > can
> > > > see is through late binding with the CreateObject method and
> specifying
> > a
> > > > server name.  I dont think this is even supported in VB5.

> > > > How can you do it with early binding.  How to you get a reference to
a
> > > > remote DCOM componant?

> > > > What are the advantages of DCOM this way over MTS?



Tue, 21 Oct 2003 00:27:29 GMT  
 DCOM componant

This is early bound - the result of the Create call is passed to a typesafe
reference, not an "as object" type. Early binding generally means TypeSafe
checking at compile time, it doesn't prohibit the use of CreateObject... if
a type mismatch occurs, it occurs on the Create line of code - how early do
you want binding ??? :-)

Paul.


Quote:
> I am talking about early binding?



> > Because you explicitly specify the server name in your call to
> > CoCreateInstanceEx...

> > http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

> > Paul.



> > > How does the VB app know to access the componant remotely if the
typelib
> > is
> > > local....



> > > > You can do it; you need a local typelib or copy of the component
> > installed
> > > > to get early bind information from. In VB6, CreateObject has a
second
> > > > parameter as a server name; from VB5 you have to call
> CoCreateInstanceEx
> > > and
> > > > specify your server there. There's an MSKB Q article about this that
> is
> > > > quite helpful IIRC - search for CreateObjectEx and I think you'll
find
> > > it...

> > > > Paul.



> > > > > I see alot of information pertaining to setting up a DCOM
componant
> on
> > > the
> > > > > server.  I can do that.

> > > > > But how do you access this componant from the client.  The only
way
> I
> > > can
> > > > > see is through late binding with the CreateObject method and
> > specifying
> > > a
> > > > > server name.  I dont think this is even supported in VB5.

> > > > > How can you do it with early binding.  How to you get a reference
to
> a
> > > > > remote DCOM componant?

> > > > > What are the advantages of DCOM this way over MTS?



Tue, 21 Oct 2003 02:22:05 GMT  
 DCOM componant
Ok well what does CoCreateInstanceEx do for you?  I thought when code hit a
createobject iit had to look up class information in the regestry? This is
not true then?


Quote:

> This is early bound - the result of the Create call is passed to a
typesafe
> reference, not an "as object" type. Early binding generally means TypeSafe
> checking at compile time, it doesn't prohibit the use of CreateObject...
if
> a type mismatch occurs, it occurs on the Create line of code - how early
do
> you want binding ??? :-)

> Paul.



> > I am talking about early binding?



> > > Because you explicitly specify the server name in your call to
> > > CoCreateInstanceEx...

> > > http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

> > > Paul.



> > > > How does the VB app know to access the componant remotely if the
> typelib
> > > is
> > > > local....



> > > > > You can do it; you need a local typelib or copy of the component
> > > installed
> > > > > to get early bind information from. In VB6, CreateObject has a
> second
> > > > > parameter as a server name; from VB5 you have to call
> > CoCreateInstanceEx
> > > > and
> > > > > specify your server there. There's an MSKB Q article about this
that
> > is
> > > > > quite helpful IIRC - search for CreateObjectEx and I think you'll
> find
> > > > it...

> > > > > Paul.



> > > > > > I see alot of information pertaining to setting up a DCOM
> componant
> > on
> > > > the
> > > > > > server.  I can do that.

> > > > > > But how do you access this componant from the client.  The only
> way
> > I
> > > > can
> > > > > > see is through late binding with the CreateObject method and
> > > specifying
> > > > a
> > > > > > server name.  I dont think this is even supported in VB5.

> > > > > > How can you do it with early binding.  How to you get a
reference
> to
> > a
> > > > > > remote DCOM componant?

> > > > > > What are the advantages of DCOM this way over MTS?



Tue, 21 Oct 2003 02:22:30 GMT  
 DCOM componant
That is what CreateObject does - but underneath it calls CoCreateInstance,
which looks in the registry for local or remote registration. If you call
CoCreateInstanceEx (==CreateObject in VB6 with a server specified), you have
the choice of specifying a server.

If DCOM relied solely on registry information, then you would not be able to
specify a server at run-time. VB just (in v5 certainly) hides this from you.

Paul.


Quote:
> Ok well what does CoCreateInstanceEx do for you?  I thought when code hit
a
> createobject iit had to look up class information in the regestry? This is
> not true then?



> > This is early bound - the result of the Create call is passed to a
> typesafe
> > reference, not an "as object" type. Early binding generally means
TypeSafe
> > checking at compile time, it doesn't prohibit the use of CreateObject...
> if
> > a type mismatch occurs, it occurs on the Create line of code - how early
> do
> > you want binding ??? :-)

> > Paul.



> > > I am talking about early binding?



> > > > Because you explicitly specify the server name in your call to
> > > > CoCreateInstanceEx...

> > > > http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

> > > > Paul.



> > > > > How does the VB app know to access the componant remotely if the
> > typelib
> > > > is
> > > > > local....



> > > > > > You can do it; you need a local typelib or copy of the component
> > > > installed
> > > > > > to get early bind information from. In VB6, CreateObject has a
> > second
> > > > > > parameter as a server name; from VB5 you have to call
> > > CoCreateInstanceEx
> > > > > and
> > > > > > specify your server there. There's an MSKB Q article about this
> that
> > > is
> > > > > > quite helpful IIRC - search for CreateObjectEx and I think
you'll
> > find
> > > > > it...

> > > > > > Paul.



> > > > > > > I see alot of information pertaining to setting up a DCOM
> > componant
> > > on
> > > > > the
> > > > > > > server.  I can do that.

> > > > > > > But how do you access this componant from the client.  The
only
> > way
> > > I
> > > > > can
> > > > > > > see is through late binding with the CreateObject method and
> > > > specifying
> > > > > a
> > > > > > > server name.  I dont think this is even supported in VB5.

> > > > > > > How can you do it with early binding.  How to you get a
> reference
> > to
> > > a
> > > > > > > remote DCOM componant?

> > > > > > > What are the advantages of DCOM this way over MTS?



Tue, 21 Oct 2003 05:12:59 GMT  
 DCOM componant
I saw you convo, and was wondering, how do i add new components and object
after compiling the program, is that possible? like a plugin basically that
accesses variable and functions from the original program.


Quote:
> That is what CreateObject does - but underneath it calls CoCreateInstance,
> which looks in the registry for local or remote registration. If you call
> CoCreateInstanceEx (==CreateObject in VB6 with a server specified), you
have
> the choice of specifying a server.

> If DCOM relied solely on registry information, then you would not be able
to
> specify a server at run-time. VB just (in v5 certainly) hides this from
you.

> Paul.



> > Ok well what does CoCreateInstanceEx do for you?  I thought when code
hit
> a
> > createobject iit had to look up class information in the regestry? This
is
> > not true then?



> > > This is early bound - the result of the Create call is passed to a
> > typesafe
> > > reference, not an "as object" type. Early binding generally means
> TypeSafe
> > > checking at compile time, it doesn't prohibit the use of
CreateObject...
> > if
> > > a type mismatch occurs, it occurs on the Create line of code - how
early
> > do
> > > you want binding ??? :-)

> > > Paul.



> > > > I am talking about early binding?



> > > > > Because you explicitly specify the server name in your call to
> > > > > CoCreateInstanceEx...

> > > > > http://support.microsoft.com/support/kb/articles/Q180/2/17.ASP

> > > > > Paul.



> > > > > > How does the VB app know to access the componant remotely if the
> > > typelib
> > > > > is
> > > > > > local....


message

> > > > > > > You can do it; you need a local typelib or copy of the
component
> > > > > installed
> > > > > > > to get early bind information from. In VB6, CreateObject has a
> > > second
> > > > > > > parameter as a server name; from VB5 you have to call
> > > > CoCreateInstanceEx
> > > > > > and
> > > > > > > specify your server there. There's an MSKB Q article about
this
> > that
> > > > is
> > > > > > > quite helpful IIRC - search for CreateObjectEx and I think
> you'll
> > > find
> > > > > > it...

> > > > > > > Paul.



> > > > > > > > I see alot of information pertaining to setting up a DCOM
> > > componant
> > > > on
> > > > > > the
> > > > > > > > server.  I can do that.

> > > > > > > > But how do you access this componant from the client.  The
> only
> > > way
> > > > I
> > > > > > can
> > > > > > > > see is through late binding with the CreateObject method and
> > > > > specifying
> > > > > > a
> > > > > > > > server name.  I dont think this is even supported in VB5.

> > > > > > > > How can you do it with early binding.  How to you get a
> > reference
> > > to
> > > > a
> > > > > > > > remote DCOM componant?

> > > > > > > > What are the advantages of DCOM this way over MTS?



Wed, 22 Oct 2003 03:13:03 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. DCOM componant

2. create implement DCOM componant

3. create implement DCOM componant

4. create implement DCOM componant

5. DCOM, DCOM , DCOM!!!

6. DCOM: Cannot cannot connect multiple users to a DCOM server

7. DCOM: Cannot cannot connect multiple users to a DCOM server

8. DCOM: Cannot cannot connect multiple users to a DCOM server

9. ActiveX Componant can't create object

10. ActiveX Componant Can't Create Object

11. ActiveX Componant can't create object

12. ActiveX Componant Cannot Create Object

 

 
Powered by phpBB® Forum Software