How to create access point
Article Metadata
If you want to create a new entry in the IAP table.
The code works fine.
#include commdb.h
#include cdbcols.h
//Link Against : commdb.lib
void CYourApp::SetNewIAP(TDesC8& aIAPName)
{
TUint32 aIAPId=0;
TInt aGPRSId=0;
TInt aId=0;
TInt aError;
TCommDbOpeningMethod aMethod;
static CCommsDatabase* aComDB =
CCommsDatabase::NewL(EDatabaseTypeIAP, aMethod);
CleanupStack::PushL(aComDB );
CCommsDbTableView* aView ;
aView = aComDB ->OpenTableLC(TPtrC(IAP));
aError = aView->InsertRecord(iapId);
aView->WriteTextL(TPtrC(COMMDB_NAME), aIAPName);
aView->WriteTextL(TPtrC(IAP_SERVICE_TYPE), TPtrC(OUTGOING_GPRS));
aView->WriteUintL(TPtrC(IAP_SERVICE), aGPRSId);
aView->WriteUintL(TPtrC(IAP_NETWORK_WEIGHTING), 0);
aView->WriteUintL(TPtrC(IAP_NETWORK), aId);
aView->WriteUintL(TPtrC(IAP_BEARER), 0);
aView->WriteTextL(TPtrC(IAP_BEARER_TYPE), TPtrC(MODEM_BEARER));
aView->WriteUintL(TPtrC(IAP_LOCATION), 2);
aError = aView->PutRecordChanges(EFalse, EFalse);
CleanupStack::Pop(aComDB);
CleanupStack::Pop(aView);
delete aView;
delete aComDB;
}


17 Sep
2009
This article had explained about how to create a access point before we want to know about that
Definition: Wireless access points (APs or WAPs) are specially configured nodes on wireless local area networks (WLANs). Access points act as a central transmitter and receiver of WLAN radio signals. Access points used in home or small business networks are generally small, dedicated hardware devices featuring a built-in network adapter, antenna, and radio transmitter. Access points support Wi-Fi wireless communication standards.
Although very small WLANs can function without access points in so-called "ad hoc" or peer-to-peer mode, access points support "infrastructure" mode. This mode bridges WLANs with a wired Ethernet LAN and also scales the network to support more clients. Older and base model access points allowed a maximum of only 10 or 20 clients; many newer access points support up to 255 clients
so here this artcle is used for the beginners to learn about how to create access point
Omegayy - Nobody notice that there is some thing wrong?
CleanupStack::PushL(aComDB );
...... aView = aComDB ->OpenTableLC(TPtrC(IAP)); CleanupStack::PushL(aView);
...... CleanupStack::Pop(aComDB); CleanupStack::Pop(aView); delete aView; delete aComDB;
Obviously these CleanupStack operations are not correct!omegayy 15:11, 10 August 2011 (EEST)
Hamishwillee - @omegayy Well fix it dear Liza Dear Liza
@omegayy - thanks. I removed the line pushing aView to the cleanup stack - since the OpenLC does that for you. The use of a prefix in contravention of naming convention irritating too, but I don't choose to fix that. Also not sure about making aComDB static.
Note that this is a wiki. If you spot a problem feel free to fix it yourself!hamishwillee 04:52, 26 August 2011 (EEST)