Passing interface pointers over internet 
Author Message
 Passing interface pointers over internet

How can I pass COM interface pointers over internet,
i.e., set up the proxy/stub and let them communicate over
internet (preferably using TCP instead of UDP)?

I'm not sure if these procedures are enough:

1. Create an IStream* on a block of memory.
2. Call CoMarshalInterface with the created IStream*,
    specify MSHCTX_DIFFERENTMACHINE
3. pass the block of memory to the network peer process using
    whatever method ( such as custom TCP channel )
4. When the peer process receives the memory,
    it calls CoUnMarshalInterface to get the proxy,
    which is able to call the object over the internet???

I'm not sure because I hear all sorts of thing about
SCM, DCOM security, AppID, Stub manager, OID, OXID,
distributed garbage collection, etc.. How are these things related
in my problem? Thanks.



Wed, 01 Sep 2004 09:41:53 GMT  
 Passing interface pointers over internet
It's not exactly what you are asking; however, I suggest you use the SOAP
toolkit and a web service.

Dave Smith


Quote:
> How can I pass COM interface pointers over internet,
> i.e., set up the proxy/stub and let them communicate over
> internet (preferably using TCP instead of UDP)?

> I'm not sure if these procedures are enough:

> 1. Create an IStream* on a block of memory.
> 2. Call CoMarshalInterface with the created IStream*,
>     specify MSHCTX_DIFFERENTMACHINE
> 3. pass the block of memory to the network peer process using
>     whatever method ( such as custom TCP channel )
> 4. When the peer process receives the memory,
>     it calls CoUnMarshalInterface to get the proxy,
>     which is able to call the object over the internet???

> I'm not sure because I hear all sorts of thing about
> SCM, DCOM security, AppID, Stub manager, OID, OXID,
> distributed garbage collection, etc.. How are these things related
> in my problem? Thanks.



Wed, 01 Sep 2004 14:03:24 GMT  
 Passing interface pointers over internet
You could also call CreateObjrefMoniker, get the display name of the moniker
and pass is over the internet. On the remote computer, call CoGetObject.
This is the simplest way.

--
Frederic Claux



Quote:
> How can I pass COM interface pointers over internet,
> i.e., set up the proxy/stub and let them communicate over
> internet (preferably using TCP instead of UDP)?

> I'm not sure if these procedures are enough:

> 1. Create an IStream* on a block of memory.
> 2. Call CoMarshalInterface with the created IStream*,
>     specify MSHCTX_DIFFERENTMACHINE
> 3. pass the block of memory to the network peer process using
>     whatever method ( such as custom TCP channel )
> 4. When the peer process receives the memory,
>     it calls CoUnMarshalInterface to get the proxy,
>     which is able to call the object over the internet???

> I'm not sure because I hear all sorts of thing about
> SCM, DCOM security, AppID, Stub manager, OID, OXID,
> distributed garbage collection, etc.. How are these things related
> in my problem? Thanks.



Wed, 01 Sep 2004 17:31:47 GMT  
 Passing interface pointers over internet
This is very interesting! Thanks!

But will this work over NAT, or does this require the 2 sides
have IIS running as the CIS doc in MSDN mentions?


Quote:
> You could also call CreateObjrefMoniker, get the display name of the moniker
> and pass is over the internet. On the remote computer, call CoGetObject.
> This is the simplest way.

> --
> Frederic Claux



> > How can I pass COM interface pointers over internet,
> > i.e., set up the proxy/stub and let them communicate over
> > internet (preferably using TCP instead of UDP)?

> > I'm not sure if these procedures are enough:

> > 1. Create an IStream* on a block of memory.
> > 2. Call CoMarshalInterface with the created IStream*,
> >     specify MSHCTX_DIFFERENTMACHINE
> > 3. pass the block of memory to the network peer process using
> >     whatever method ( such as custom TCP channel )
> > 4. When the peer process receives the memory,
> >     it calls CoUnMarshalInterface to get the proxy,
> >     which is able to call the object over the internet???

> > I'm not sure because I hear all sorts of thing about
> > SCM, DCOM security, AppID, Stub manager, OID, OXID,
> > distributed garbage collection, etc.. How are these things related
> > in my problem? Thanks.



Wed, 01 Sep 2004 18:50:54 GMT  
 Passing interface pointers over internet
It will work without IIS running on the client.

--
Frederic Claux



Quote:
> This is very interesting! Thanks!

> But will this work over NAT, or does this require the 2 sides
> have IIS running as the CIS doc in MSDN mentions?


message

> > You could also call CreateObjrefMoniker, get the display name of the
moniker
> > and pass is over the internet. On the remote computer, call CoGetObject.
> > This is the simplest way.

> > --
> > Frederic Claux




> > > How can I pass COM interface pointers over internet,
> > > i.e., set up the proxy/stub and let them communicate over
> > > internet (preferably using TCP instead of UDP)?

> > > I'm not sure if these procedures are enough:

> > > 1. Create an IStream* on a block of memory.
> > > 2. Call CoMarshalInterface with the created IStream*,
> > >     specify MSHCTX_DIFFERENTMACHINE
> > > 3. pass the block of memory to the network peer process using
> > >     whatever method ( such as custom TCP channel )
> > > 4. When the peer process receives the memory,
> > >     it calls CoUnMarshalInterface to get the proxy,
> > >     which is able to call the object over the internet???

> > > I'm not sure because I hear all sorts of thing about
> > > SCM, DCOM security, AppID, Stub manager, OID, OXID,
> > > distributed garbage collection, etc.. How are these things related
> > > in my problem? Thanks.



Thu, 02 Sep 2004 16:52:51 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Passing a Pointer to Pointer to an Interface

2. Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object

3. Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object

4. Passing interface pointer

5. Passing interface pointer from VC++ to VB

6. COM/ATL novice:passing object pointers through methods on a COM interface

7. proper way for passing com interface pointers

8. Can I pass the pointer of interface between the two threads

9. run time error when passing a pointer to struct for a dual interface

10. Passing interface pointer through event

11. Help with passing interface pointers

12. passing interfaces pointers?

 

 
Powered by phpBB® Forum Software