Hi All..
I am trying to create an instance of a Symbian AO from inside a Qt C++ class..
SendSms::SendSms()
{
iSmsDll->NewL();
}
SendSms::SendSms()
{
iSmsDll->NewL();
}
To copy to clipboard, switch view to plain text mode
and in the destructor.. i am not sure how to delete or whether not to delete the instance of the Symbian Instance..
SendSms::~SendSms()
{
delete iSmsDll;
// if (iSmsDll)
// {
// delete iSmsDll;
// iSmsDll = NULL;
// }
}
SendSms::~SendSms()
{
delete iSmsDll;
// if (iSmsDll)
// {
// delete iSmsDll;
// iSmsDll = NULL;
// }
}
To copy to clipboard, switch view to plain text mode
My aim is to pass a Phone Number and some Text Message to a SendL() function of the Symbian Active Object which is actually a DLL loaded in to my Qt app.. from within a function of my Qt C++ class..
bool SendSms::SendSmsDll()
{
//char *iPhoneNum= "+447583411245", *iSmsText = "Hidden Message";
//iSmsText("Hidden Message");
//iPhoneNum.Copy(_L("+447583411245"));
TBuf16<128> iPhoneNum,iSmsText;
iSmsText.Copy(_L16("Hidden Message")); iPhoneNum.Copy(_L16("+447908786655"));
TBool retval = iSmsDll->SendL(iPhoneNum,iSmsText);
if(retval)
{
return false;
}
else
{
return true;
}
}
bool SendSms::SendSmsDll()
{
//char *iPhoneNum= "+447583411245", *iSmsText = "Hidden Message";
//iSmsText("Hidden Message");
//iPhoneNum.Copy(_L("+447583411245"));
TBuf16<128> iPhoneNum,iSmsText;
iSmsText.Copy(_L16("Hidden Message")); iPhoneNum.Copy(_L16("+447908786655"));
TBool retval = iSmsDll->SendL(iPhoneNum,iSmsText);
if(retval)
{
return false;
}
else
{
return true;
}
}
To copy to clipboard, switch view to plain text mode
My Symbian AO's SendL() prototype:
bool SendL( const TDesC& aRecipientNumber,const TDesC& aMessageText );
bool SendL( const TDesC& aRecipientNumber,const TDesC& aMessageText );
To copy to clipboard, switch view to plain text mode
My problem is I am getting "A Data exception has occured" exception when I trigger this SendSmsDll().. is this related to creating and deleting of Symbian AO from within Qt..???
and if don create an instance of the AO and don delete it's instance n use SendL() directly I am getting "Thread 0x1f1 has panicked. Category: USER; Reason: 11" error.. i guess something related to copying data in to descriptors..
Can u plz help me how to resolve these two erros..
Thanks..
Bookmarks