Hi All,

I am trying to write a C++ program on a S60 series 3 Nokia that extracts all of the SMS messages on the phone in the PDU mode, and to save these PDU strings to a file on the phone. For instance, to get a string looking something like: 07917283010010F5 (the start of a PDU shown on DreamFabric).

I have managed to extract the message txt in unicode without too many problems, however I am interested in getting the PDU instead of the text.

I thought that I could somehow use:

CSmsUserData &userdata = smsPDU.UserData();

To get the PDU string (such as 07917283010010F5...), but I am not sure if this is the correct method and if its possible to get it to a descriptor so I can write it to file ?

CClientMtmRegistry* MtmRegistry = CClientMtmRegistry::NewL( *session );

CSmsClientMtm* SmsMtm = STATIC_CAST(CSmsClientMtm*, MtmRegistry->NewMtmL(KUidMsgTypeSMS));

CMsvEntrySelection* entries = inboxcontent->ChildrenL();
CleanupStack::PushL( entries);
TInt msgCount = entries->Count();

TMsvId entryID = entries->At(i);

CMsvEntry* entry=session->GetEntryL((*entries)[i]);
CMsvStore* inboxStore = entry->ReadStoreL();

if (inboxStore->HasBodyTextL())
CSmsHeader& header = SmsMtm->SmsHeader();
CSmsMessage& message = header.Message ();
CSmsPDU& smsPDU = message.SmsPDU();


CRichText& body = SmsMtm->Body();

TPtrC text( body.Read( 0 ) );

CSmsUserData &userdata = smsPDU.UserData();

Can anyone help me ? I would be really grateful.