C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sending Data over Shared Memories (MFC)

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jul 11, 2006 9:10 am    Post subject: Sending Data over Shared Memories (MFC) Reply with quote



Hi,

I want to develop a program, that transmits several classes between two
processes. It should be built after the guidelines of the
iso/osi-reference model and work with a shared memory. At the moment I
copy all the data into a buffer, add the specific overhead and send
them to the memory. But if the data contains any strings, it adds only
the pointer and not the string itsself. How can I realize, that the
program copies the string and not the pointer into "pBuffer"? I have
already looked at serialization and streams, but it still didn't work.

Anyone knows, how to handle this problem?


The structure for the data transport looks like this:

struct SDataModule // layer 7 module
{
long commandCount; // number of elements in the buffer
char pBuffer[MAX_COUNT_BYTES]; // storage buffer
};

struct STransportModule // layer 4 module
{
long seqNumber; // a sequence number to mark each block
SDataModule data; // the data to transport
};

struct SNetworkModule // layer 3 module
{
char source[16]; // the ip from the user computer
STransportModule transport; // the data to transport
};

struct SMemoryModule // layer 1 module
{
BOOL full; // indication that the shared memory is full
SNetworkModule network; // the data to transport
};


TIA
Volker Nitschke
Back to top
Robbie Hatley
Guest





PostPosted: Tue Jul 11, 2006 9:10 am    Post subject: Re: Sending Data over Shared Memories (MFC) Reply with quote



<volker_nitschke (AT) gmx (DOT) de> wrote:

Quote:
(MFC question)

That's strictly Microsoft stuff. Has nothing to do with C++.

Ask HERE instead:

comp.os.ms-windows.programmer.win32 (I set followup here.)

--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lone wolf intj at pac bell dot net
(put "[usenet]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.