Link to home
Start Free TrialLog in
Avatar of garygreen
garygreen

asked on

Using Arrays with DCOM

How do I pass Arrays using DCOM in VB5?

How do I do 2-way communication so that the client is also a server and the server also a client???

To clarify I want the server to send an Array to the client and to receive an Array from the client

Last bit - I promise

What is the best way to pass a UDT using DCOM?  I know it doesn't support it - any tips?
Avatar of EDDYKT
EDDYKT
Flag of Canada image

On your server, declare

func(myarray() as integer, ....)


When you call on client

dim myarray(10) as integer
server.func(myarray(),...

where server is server object

I believe you should get the idea.
Avatar of garygreen
garygreen

ASKER

Edited text of question.
Thanks for the info - very useful
Can you help with the server/client side?

Thanks
I don't quite understand your question.

You can build two class on your app.

One class is responsible for server and the other is for client.

?->
Edited text of question.
Same idea

On your server, declare

func(myarray() as integer, returnarray () as integer)


When you call on client

dim myarray(10) as integer
server.func(myarray(),returnarray () as integer)

where server is server object

I believe you should get the idea.

As long as you use byref (by default) then it whould be ok
Edited text of question.
Adjusted points to 300
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial