×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    How to copy data TBuf to TPtr8?

    Hi

    How to copy buffer data in TPtr8?
    my code:
    TBuf16<100> response;
    response.Copy(_L("eeeee"));
    TPtr8 ptrBuffer2Decode(NULL , 0 , 0);
    ptrBuffer2Decode.Copy((TUint*)response.Ptr(), response.Size());

    Regards,
    SymbianTH

  2. #2
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How to copy data TBuf to TPtr8?

    Hi

    Copy data succefully if write following code

    TBufC8<KResponseLength> buf;
    buf.Des().Copy(_L("sfsdfsdf"));
    TPtr8 ptr(buf.Des());

    But problem is
    .H
    ---
    TPtr8 iPtrBuffer2Decode; is Global variable

    .cpp
    ----
    iPtrBuffer2Decode.Copy(buf.Des()); Application closed Please help me. how i copy data in global varible?



    SymbianTH

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: How to copy data TBuf to TPtr8?

    Check the panic code, http://wiki.forum.nokia.com/index.ph...ded_panic_code as usual.
    It is probably an overflow. Anyway, according to these two posts, you have absolutely no idea about descriptors. Check http://descriptors.blogspot.com

Similar Threads

  1. Replies: 3
    Last Post: 2009-03-03, 06:20
  2. J2ME encrypt C# decrypt
    By josual in forum Mobile Java Networking & Messaging & Security
    Replies: 13
    Last Post: 2008-10-20, 04:29
  3. Replies: 4
    Last Post: 2007-08-28, 19:02
  4. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  5. copy data from 6210 to 6230
    By Dimedrol in forum General Development Questions
    Replies: 1
    Last Post: 2004-06-23, 16:57

Posting Permissions

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