hi,
i am using the following code to save the sms
TBuf<60> aAddress(_L("57657657"));
TBuf<60> aDescription(_L("a smple sms"));
TBuf<60> aMessage(_L("a smple sms"));
iMtmRegistry = CClientMtmRegistry::NewL( *iSession );
// Create an SMS Client MTM object.
iSmsMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS ) );
iSmsMtm->SwitchCurrentEntryL(KMsvGlobalInBoxIndexEntryId); //inbox
TMsvId serviceId( KUidMsgTypeSMS.iUid );
iSmsMtm->CreateMessageL(KUidMsgTypeSMS.iUid);
// iSmsMtm->CreateMessageL(serviceId);
// iSmsMtm->AddAddresseeL(aAddress); //to address if need
CSmsHeader& iHeader = iSmsMtm->SmsHeader();
iHeader.SetFromAddressL(aAddress);
CRichText& body = iSmsMtm->Body();
body.Reset();
body.InsertL(0, aMessage);
TMsvEntry entry = iSmsMtm->Entry().Entry();
entry.SetInPreparation(EFalse);
entry.SetVisible(ETrue);
entry.iDate.HomeTime();
entry.iDescription.Set(aDescription);
entry.iDetails.Set(aAddress);
entry.SetUnread(ETrue);
iSmsMtm->Entry().ChangeL(entry);
iSmsMtm->SaveMessageL();
the iSmsMtm is of CSmsClientMtm type and iMtmRegistry is of CClientMtmRegistry type.
but when i am debuging this code it is giving the panic at following line
iSmsMtm->CreateMessageL(KUidMsgTypeSMS.iUid);
the panic is KERN EXEC 44,
i know the meaning of KERN EXEC 44 but i dont know how to resolve the problem.
if any body have any idea please replay
Thanks
Vickey



