DCOM - transferring data to a remote computer 
Author Message
 DCOM - transferring data to a remote computer

Hi,
I am fairly new to this stuff, and am just beginning to learn a bit about
ATL, COM and DCOM.
Currenly I have a class which has several member variables, some of which
are ints, bools, strings and
arrays.
I would ultimately like to transfer this class to another computer using
DCOM.
What I want to know is this:
Should I create a property or method for each member variable in my class?
Or could I transfer my class
as a liner buffer and cast it back to the class on the other computer? What
is the best way to do this?
I do not need to know implementation details as yet, I just need some
direction.
Any help, however small would be greatly appreciated.

regards,



Sun, 01 Dec 2002 03:00:00 GMT  
 DCOM - transferring data to a remote computer
You might want to either have a gigantic method which passes all the
data in one shot or if you dont like that, you might attempt passing it
via SAFEARRAY or a array of structs ..

Quote:

> Hi,
> I am fairly new to this stuff, and am just beginning to learn a bit about
> ATL, COM and DCOM.
> Currenly I have a class which has several member variables, some of which
> are ints, bools, strings and
> arrays.
> I would ultimately like to transfer this class to another computer using
> DCOM.
> What I want to know is this:
> Should I create a property or method for each member variable in my class?
> Or could I transfer my class
> as a liner buffer and cast it back to the class on the other computer? What
> is the best way to do this?
> I do not need to know implementation details as yet, I just need some
> direction.
> Any help, however small would be greatly appreciated.

> regards,


--
Girish Bharadwaj


Sun, 01 Dec 2002 03:00:00 GMT  
 DCOM - transferring data to a remote computer

Quote:

>Hi,
>I am fairly new to this stuff, and am just beginning to learn a bit about
>ATL, COM and DCOM.
>Currenly I have a class which has several member variables, some of which
>are ints, bools, strings and
>arrays.
>I would ultimately like to transfer this class to another computer using
>DCOM.
>What I want to know is this:
>Should I create a property or method for each member variable in my class?

Never do this, the reason is that to access each piece of data you will have
to make a network call and this amount of calls will kill performance.

Quote:
>Or could I transfer my class
>as a liner buffer and cast it back to the class on the other computer? What
>is the best way to do this?

If you want to use type library marshalling then you could use IRecordInfo
to pass essentially a VB user designed type. Another option is to create an
object with read/write propertie and marshal this object by value as a
parameter to your method - ADO disconnected record sets and COM error
objects are passed across the network in this way. (I would favour this
method.)

Just as a plug, MSDN Magazine will have an article in a couple of months
time by me called "Data Transfer using COM on Windows 2000". I cover these
issues there and give some recommendations about data packet sizes.

Richard
--
www.idevresource.com



Sun, 01 Dec 2002 03:00:00 GMT  
 DCOM - transferring data to a remote computer
Dr. Richard,
I have succesfully managed to marshal my object by value. The technique
seems to be working very well.
Thanks for the advice, I look forward to reading the article on MSDN
magazine.

regards,



Quote:


> >Hi,
> >I am fairly new to this stuff, and am just beginning to learn a bit about
> >ATL, COM and DCOM.
> >Currenly I have a class which has several member variables, some of which
> >are ints, bools, strings and
> >arrays.
> >I would ultimately like to transfer this class to another computer using
> >DCOM.
> >What I want to know is this:
> >Should I create a property or method for each member variable in my
class?

> Never do this, the reason is that to access each piece of data you will
have
> to make a network call and this amount of calls will kill performance.

> >Or could I transfer my class
> >as a liner buffer and cast it back to the class on the other computer?
What
> >is the best way to do this?

> If you want to use type library marshalling then you could use IRecordInfo
> to pass essentially a VB user designed type. Another option is to create
an
> object with read/write propertie and marshal this object by value as a
> parameter to your method - ADO disconnected record sets and COM error
> objects are passed across the network in this way. (I would favour this
> method.)

> Just as a plug, MSDN Magazine will have an article in a couple of months
> time by me called "Data Transfer using COM on Windows 2000". I cover these
> issues there and give some recommendations about data packet sizes.

> Richard
> --
> www.idevresource.com



Mon, 02 Dec 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. NEWBIE DCOM HELP: Forced to build objects on remote computer

2. Launching DCOM server on remote computer

3. secure file transfer: DCOM or HTTPS

4. How transfer files via DCOM

5. DCOM: Exception on client site during transfer of an array

6. Transfer files between computers

7. Transfer files between computers

8. Transfer files between computers

9. remote data control(RDO)-accesing data in rdo

10. Test DCOM on remote machine

11. How to get the client machine IP address from remote DCOM object

12. DCOM disconnects remote object references

 

 
Powered by phpBB® Forum Software