开发者

How to concat various Symbian descriptors

开发者 https://www.devze.com 2023-02-13 07:23 出处:网络
I am having some difficulty working with Symbian descriptors. I would essentially like to take various descriptors and concat them together into one larger descriptor, perhaps placing them into an RBu

I am having some difficulty working with Symbian descriptors. I would essentially like to take various descriptors and concat them together into one larger descriptor, perhaps placing them into an RBuf. Also the pieces of data will change in length each type the program runs, below is a bit of skeleton code I have been playing around with but have not been able to build.

HBufC8 * aVar = someObj.aVarData();
HBufC * anotherVar = someObj.anotherVarData();
H开发者_Python百科Buf8 * someVar = someObj.someVarData();

//Perform some operation to convert the descriptors to the same type and add them to a RBuf;

RBuf toLog;
toLog.CreateL( _L("Info to Log"));
toLog.Append( aVar );
toLog.Append( anotherVar );
toLog.Append( someVar );

I have not been able to correclty figure out how to convert and add the descriptors to the buffer, as you can see from the comment. Thanks in advance.


Append() takes a reference to TDesC, as a param. So, your code should be like below:

toLog.Append( *aVar );
toLog.Append( *anotherVar );
toLog.Append( *someVar );


Your code looks approximately correct. What error do you get? Beware you are mixing 8 and 16-bit descriptor types.

Read http://descriptors.blogspot.com/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号