Thanks symbianyucca...
I got the gsmbas.lib file in SDK 1st Edition and i copied it to my SDK 2nd Edition. The program is now running successfully on the emulator as well as my N70 device. The code for retrieving cell id and location area code in 2nd Edition is:
Code:
RTelServer server;
CleanupClosePushL(server);
User::LeaveIfError(server.Connect());
User::LeaveIfError(server.LoadPhoneModule(_L("phonetsy.tsy")));
RTelServer::TPhoneInfo info;
User::LeaveIfError(server.GetPhoneInfo(0, info));
RBasicGsmPhone phone;
CleanupClosePushL(phone);
User::LeaveIfError(phone.Open(server, info.iName));
MBasicGsmPhoneNetwork::TCurrentNetworkInfo ni ;
phone.GetCurrentNetworkInfo( ni ) ;
//Cell Id
TInt cellId = ni.iCellId;
TBuf<20> cellidrepr;
cellidrepr.AppendNum(cellId);
//Location Area Code
TInt locationareacode = ni.iLocationAreaCode;
TBuf<20> locationareacoderepr;
locationareacoderepr.AppendNum(locationareacode);
The above code gives the cellid in cellidrepr and location area code in locationareacoderepr.
The header files required are etel.h,etelbgsm.h.
The library files are etel.lib and gsmbas.lib.