Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Send the content of a Structure with write() of RSocket class

1 replies · 2,045 views · Started 18 April 2004

Hello,

i am quite new to symbian, so this question might sound a bit stupid, but i hope somebody will help me.

I have a structure which looks as follows:

struct test
{
TPoint point;
TInt status;
};

I want to send the content of the whole structure to another computer via the write() function of RSocket class.
Write() accepts only const TDesC8& parameters.

Could somebody please explain how to send the data with write()? Thank you in advance.

oe3vsfm4

Unregistered1 wrote:Hello,

i am quite new to symbian, so this question might sound a bit stupid, but i hope somebody will help me.

I have a structure which looks as follows:

struct test
{
TPoint point;
TInt status;
};

I want to send the content of the whole structure to another computer via the write() function of RSocket class.
Write() accepts only const TDesC8& parameters.

Could somebody please explain how to send the data with write()? Thank you in advance.

oe3vsfm4


Try typecast it using TAny* and then typecast it to TDesC8 .