Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:如何不经用户提示创建一个Internet连接

From Wiki
Jump to: navigation, search

Archived.png存档: 这篇文章是存档,因为考虑到今天它与第三方开发者建立商业解决方案不相关。

Article Metadata

兼容于
平台: S60 2nd Edition
S60 2nd Edition (initial release)

文章
翻译:
huwell
最后由 hamishwillee 在 17 Aug 2012 编辑


  • 说明:

下面的代码演示了如何创建一个Internet连接,而不提示用户 使用哪种方法连接或者选择哪个GPRS接入点. 你需要知道你想 使用的那个Internet接入点(IAP)的标示(ID)。

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);
This page was last modified on 17 August 2012, at 06:12.
395 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×