Link to home
Start Free TrialLog in
Avatar of kenick
kenick

asked on

Passing an object between processes

I have two vc++ applications that communicate using a
named pipe.  I would like to send some local variable
values down the pipe from the client to the server.  At
present the only way I have achieved this successfully
is to convert the values to one long character string.  As I have encapsulated the variables into a container class, I would like to pass the whole container object by value down the pipe.  How do I do this?  Is there an easier/better method than using pipes?
Avatar of chensu
chensu
Flag of Canada image

I would suggest using File Mapping. File Mapping allows two or more applications to share memory. Look into the documentation about File Mapping.
Avatar of kenick
kenick

ASKER

Thats a possibility, but can you do this with pipes?  I have all the code inplace for pipe communication.  All I would like to know is how to convert an active object (or its data members) to a byte stream.
ASKER CERTIFIED SOLUTION
Avatar of jstolan
jstolan

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
jstolan,

Does it work in Win32?