I'm assuming client and server are two separate programs. Two processes can not share the same memory location. How to pass data between client and server will depend on the operating system. Its even more complicated when client and server run on different computers.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Are the client and server separate processes? Or are they threads inside the same process?
rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179
You can't just pass addresses between separate processes on modern operating systems because each process has its own virtual memory. This would include using an RPC (remote procedure call). That would work for old monolithic systems such as DOS, but I don't think it will work with any Windows systems since NT, and it certainly won't work with Linux, Unix, etc. An RPC will marshal the procedure argument data at the sending end, and unmarshal it at the receiving end, but you can't send a structure with addresses in it. You have to send the things the addresses refer to themselves.
So, just to make sure we are clear, what EXACTLY are you trying to do? Describe the environment (client, server, interprocess communications methods, etc) that you are trying to accomplish, in as much detail as possible.
rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179