Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,
I'm using visual c 2006.I have one main struct and one small pipe struct in PC1.The same main struct and the same pipe struct i have in PC2.In PC2 i have one GUI.
Before if one variable i'm injecting in GUI,i used to send the entire struct to PC1 through ETHERNET. This causes congestion problem in ethernet side.So now we created the pipe struct,means the attributes required to represent the variable i'm mapping to this pipe struct and i'm sending it to ethernet.

In the receiving side PC1 i'll check the pipe struct size and my goal is to affect the main struct .I can assign the rcving pipe struct to my local pipe struct.How shall i affect the main struct???

The pipe struct consists of different data types...
Posted

1 solution

You may do a memberwise copy from the pipe struct to the main one. Of course you need to know the definitions of both the structs. Exploiting struct definitions knowledge you may possibly find more efficient solutions.
 
Share this answer
 
v2
Comments
v.venki88 19-Aug-11 6:52am    
hello sir,
thank you for answering me. Yes i have definitions of bothe struct in bothe pc's. I cant to memberwise copy the members in both the structures are different i.e. in pipe i'll receive all the attributes for the veriable, in main struct i'll have all the variables...
CPallini 19-Aug-11 6:56am    
You should post some code to get better help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900