RWriteStream << TPtrC
| Wed, 2006-01-04 03:51 | |
|
|
In the following code....
RWriteStream stream(&buffer); stream(&buffer); stream << aMessage; if aMessage is of type TPtrC and contains only one character say 'a', after execution of 3rd statement the 'stream' contains 2 character '4' and 'a'. I assume the first character is the discriptor data.. How do I copy aMessage to stream without any other metadata being copied. Thanks, Vink |






Forum posts: 33
I haven't looked into the implementation of streams on Symbian very far, but I do have some questions for you:
When you use RReadStream, does the string appear to be correct?
What is contained in the stream before the call to operator<<?
Is the second line 'stream(&buffer);' a typo?
If you cast the TPtrC to a TDesC, does that give you the behaviour you want? I doubt that it would, but I had to ask.
Rob
Forum posts: 364
Forum posts: 235
I haven't looked into the implementation of streams on Symbian very far, but I do have some questions for you:
When you use RReadStream, does the string appear to be correct?Â
What is contained in the stream before the call to operator<<?Â
Is the second line 'stream(&buffer);' a typo?
If you cast the TPtrC to a TDesC, does that give you the behaviour you want? I doubt that it would, but I had to ask.
Rob
But problem comes when I am sending this data to some sever component implemented in Java.
yep the second line 'stream(&buffer);' was a typo.
Nope TDesC doesn't work.
Forum posts: 1
Use RWriteStream::WriteL() instead of stream operators.