×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    20

    TBuf8 copy to Tptr8 problem

    Hi,
    When TBuf8 copy to Tptr8, exe crashed. Please let me what wrong I done or give me suggestion to over come this problem.


    void CVoIPTestEngine::SetPlayBuffer(TDesC8& aPayLoadData){
    TPtr8 iPlayBufPtr;
    TPtr8 aTempBuf(NULL,0,0);
    TPtr8 aTempBuf1(NULL,0,0);
    TBuf8<82> lPaddedPayload;
    TUint8 buf[2];

    lPaddedPayload.Zero();
    aTempBuf.Set(address->Des());
    aTempBuf1.Zero();
    aTempBuf1.Set(aTempBuf.LeftTPtr(80));
    buf[0]=0x01; buf[1]=0x00;

    lPaddedPayload.Append(buf,2);
    lPaddedPayload.Append(aTempBuf1);
    iPlayBufPtr.Copy( lPaddedPayload );//Exe crashed in this line
    iPlayBuf->SetPayloadPtr(iPlayBufPtr);
    iVoIPDnlink->BufferFilled(iPlayBuf);
    }

    Thanks
    Shakumar

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: TBuf8 copy to Tptr8 problem

    that would propably be because your iPlayBufPtr is not pointing to any reserved buffer.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    20

    Re: TBuf8 copy to Tptr8 problem

    Thanks for u'r Reply.

    as u says iPlayBufPtr is not pointing to any reserved buffer, i alter the code as follows , then also same problem (on copying exe crash).Error USER 23


    TPtr8 iPlayBufPtr(NULL,82,160);

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: TBuf8 copy to Tptr8 problem

    TPtr8 is a pointer, that does not have its own memory, thus maybe you should use TBuf8 variable instead.

Similar Threads

  1. Showing File copy progress in a progress dialog
    By nisheethpandey in forum Symbian
    Replies: 5
    Last Post: 2009-12-14, 08:23
  2. How to copy data TBuf to TPtr8?
    By SymbianTH in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-07-13, 10:58
  3. problem converting TBuf8 to TBuf16
    By sagar_kasture in forum Symbian
    Replies: 2
    Last Post: 2009-06-15, 12:21
  4. Tptr8 to TBuf8 Conversion
    By krishnaramram in forum Symbian
    Replies: 1
    Last Post: 2006-07-24, 19:21
  5. PJava runtime problem within Nokia 9210, Hrlp~!
    By Nokia_Archive in forum PersonalJava
    Replies: 1
    Last Post: 2002-05-28, 13:15

Posting Permissions

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