ok.. i have this peice of code wherein the bufer contents are written in the file located in C:\\mobinfo.txt
case EGetCellId:
buf.SetLength(0);
if(iCellID().iCountryCode.Length()<(buf.MaxLength()-buf.Length()))
{
// buf.Append(_L("MCC: "));
// buf.Append(iCellID().iCountryCode);
buf.AppendFormat(_L("MCC: [%d]"),iCellID().iCountryCode);
//buf.Append(_L("MNC: "));
//buf.Append(iCellID().iNetworkIdentity);
buf.AppendFormat(_L("MNC: [%d]"),iCellID().iNetworkIdentity);
buf.AppendFormat(_L("LAC:[%d]"),iCellID().iLocationAreaCode);
buf.AppendFormat(_L(" CI:[%d]"),iCellID().iCellId);
}
else
buf.Append(_L("increase size of buf in CMobInfo::RunL"));
LogToFile(buf);
informationNote->ExecuteLD(buf);
break;
case ENotifyCellIdChange:
buf.SetLength(0);
if(iCellID().iCountryCode.Length()<(buf.MaxLength()-buf.Length()))
{
/*
buf.Append(_L("MCC: "));
buf.Append(iCellID().iCountryCode);
buf.Append(_L("MNC: "));
buf.Append(iCellID().iNetworkIdentity);
*/
buf.AppendFormat(_L("LAC:[%d]"),iCellID().iLocationAreaCode);
buf.AppendFormat(_L(" CI:[%d]"),iCellID().iCellId);
LogToFile(buf);
iRequest = ENoMobInfoRequest;
IssueRequest(ENotifyCellIdChange);
return;
}
else
buf.Append(_L("increase size of buf in CMobInfo::RunL"));
LogToFile(buf);
informationNote->ExecuteLD(buf);
break;
This is the problem that i have....
1. when it gets printed in the txt file i want it to print in this format..
LAC:[value] CI:[value]
LAC:[value] CI:[value]
....
....
but the problem is that it goes on printing serially.....i tried putting \n and \r but doesnt seem to work...
plz if anyone can help me out with this 1..
With Regards,
Mitesh Manani
http://getpass.netfirms.com

Reply With Quote

