You Are Here:

Community: Developer Discussion Boards

#1 Old How to copy the Serv. Rec. Service Description into any modifiable buffer - 2003-11-16, 19:08

Join Date: Jun 2003
Posts: 318
advocatee
Offline
Regular Contributor
Hi,,

I wish to copy the Service Description returned by VisitAttributeValueL() into any modifiable buffer..

void TBTAttributeValueLister::VisitAttributeValueL(CSdpAttrValue& aValue, TSdpElementType aType)

I tried doing something like
TBuf<30> desc;
desc.Append(aValue.Des());

But i get the error :

cannot convert parameter 1 from 'const class TPtrC8 (void) const' to 'class TChar'

help!

- aDvo -
Reply With Quote

#2 Old 2003-11-17, 09:54

Join Date: Mar 2003
Posts: 27
stevecotton
Offline
Registered User
You're trying to mix 8 bit and 16 bit descriptors. See the documentation for TDesC8 and TDesC16.

The standard library can create a dynamically sized (to the length of the TDesC8) HBuf descriptor for you:
HBufC8* hbuf = aValue.Des().AllocLC();

Steve
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia