Hi All..

I am trying to create an instance of a Symbian AO from inside a Qt C++ class..
Qt Code:
  1. SendSms::SendSms()
  2. {
  3. iSmsDll->NewL();
  4.  
  5. }
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..
Qt Code:
  1. SendSms::~SendSms()
  2. {
  3. delete iSmsDll;
  4. // if (iSmsDll)
  5. // {
  6. // delete iSmsDll;
  7. // iSmsDll = NULL;
  8. // }
  9.  
  10. }
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..
Qt Code:
  1. bool SendSms::SendSmsDll()
  2. {
  3. //char *iPhoneNum= "+447583411245", *iSmsText = "Hidden Message";
  4. //iSmsText("Hidden Message");
  5. //iPhoneNum.Copy(_L("+447583411245"));
  6. TBuf16<128> iPhoneNum,iSmsText;
  7. iSmsText.Copy(_L16("Hidden Message")); iPhoneNum.Copy(_L16("+447908786655"));
  8. TBool retval = iSmsDll->SendL(iPhoneNum,iSmsText);
  9. if(retval)
  10. {
  11. return false;
  12. }
  13. else
  14. {
  15. return true;
  16. }
  17.  
  18. }
To copy to clipboard, switch view to plain text mode 

My Symbian AO's SendL() prototype:
Qt Code:
  1. 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..