hi all,
I am using socket to send sms to a particular mobile number. But I am getting socket not binding error.
//Opening socket
User::LeaveIfError(
socket.Open(sockServ, KSMSAddrFamily, KSockDatagram, KSMSDatagramProtocol));
CAknInformationNote* informationNote = new ( ELeave )CAknInformationNote;
TSmsAddr smsaddr;
smsaddr.SetSmsAddrFamily(ESmsAddrSendOnly);
smsaddr.SetPort( 16500 );
//binding socket with Sms address
TInt bindStatus = socket.Bind(smsaddr);
if (bindStatus = KErrNone)
{
informationNote->ExecuteLD(_L("Binding Success"));
//code to send sms
}
else
{
informationNote->ExecuteLD(_L("Binding Un Success"));
}
//end
Every time I am getting the "Binding Un Success" as display...
what is wrong with my code..
Please help me guys..


Reply With Quote


