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