Archived:How can I create an Internet connection without prompting a dialog?
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Article Metadata
Compatibility
Platform(s): S60 2nd Edition
Article
Created: User:Technical writer 2
(05 Aug 2003)
Last edited: hamishwillee
(18 Sep 2012)
Overview
How can I create an Internet connection without prompting a dialog?
Description
The following code demonstrates how to create a connection without prompting a dialog. You'll need to know the IAP ID for the access point that will be used.
RSocketServ socketServ;
RConnection connection;
User::LeaveIfError(socketServ.Connect());
User::LeaveIfError(connection.Open(socketServ));
TCommDbConnPref pref;
pref.SetIapId(4); // IAP ID for connection to be used
pref.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
pref.SetDirection( ECommDbConnectionDirectionOutgoing );
connection.Start(pref);


Does that code work in 3.rd edition too?