CCommsDatabase* commDb = CCommsDatabase::NewL(); CleanupStack::PushL(commDb); CApSelect* apSelect = CApSelect::NewLC(*commDb, KEApIspTypeAll ,EApBearerTypeAll ,KEApSortUidAscending); CApDataHandler* dataHandler = CApDataHandler::NewLC(*commDb); CApAccessPointItem* apItem = CApAccessPointItem::NewLC(); if (apSelect->MoveToFirst()) { do { if (apSelect->BearerType() == EApBearerTypeWLAN) { TBuf<50> netWorkName; dataHandler->AccessPointDataL(apSelect->Uid(), *apItem); apItem->ReadTextL(EApWlanNetworkName, netWorkName); netWorkName.Zero(); } break; } while(apSelect->MoveNext()); } CleanupStack::PopAndDestroy(4);