使用 Windows Mobile 6.5 创建 GPRS 连接

发布于 2024-09-10 06:52:05 字数 111 浏览 4 评论 0原文

我正在编写一个需要建立 GPRS 连接的应用程序。

有人可以帮我如何使用 C# 设置此连接吗?

谢谢

编辑 我需要连接 GPRS 连接,因为我需要调用网络服务。

I am writing an application in which I need to make a GPRS connection.

Can someone please help me how I can setup this connection using C#.

thanks

EDIT
I will need to connect a GPRS connection because I need to call a webservice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

过气美图社 2024-09-17 06:52:05

要使用 PocketPC 上的 .NET CF 中的拨号连接子系统进行 GPRS 连接,您可以使用连接管理器函数,例如 ConnMgrEnumDestinations、ConnMgrEstablishConnection 和 ConnMgrReleaseConnection。查看 http:// /msdn.microsoft.com/library/default.asp?url=/library/en-us/APISP/html/sp_cnmn_connection_manager.asp 了解详细信息。 .NET CF 中没有可用的类,但如果您对此有一些经验,则可以使用 P/Invoke 轻松完成此操作。
以下博客文章详细介绍了这一点,并且还包含一些 C# 代码: http://blogs.msdn.com/anthonywong/archive/2006/03/13/550686.aspx

另一个解决方案是使用 OpenNETCF.org 的智能设备框架,其中包含连接管理器的包装类:
http://www.opennetcf.org/downloads/bin/SmartDeviceFramework14.zip
1.4 版本之前,它可免费用于任何商业或非商业目的。它还包含源代码,因此您可以按原样使用它,也可以根据需要将其用作您自己的实现的参考。

(解决方案取自我们的网站 http://forum.rebex.net/questions/503/how-to-built-a-gprs-connection-for-ftp-use-on-net-cf)

To make a GPRS connect using a dial up connection subsystem from .NET CF on PocketPC, you can use Connection Manager functions such as ConnMgrEnumDestinations, ConnMgrEstablishConnection and ConnMgrReleaseConnection. Check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/APISP/html/sp_cnmn_connection_manager.asp for details. There are no classes available for this in .NET CF, but it can be done quite easily using P/Invoke if you have some experience with this.
The following blog post covers this in detail and also contains some C# code: http://blogs.msdn.com/anthonywong/archive/2006/03/13/550686.aspx.

Another solution is using the Smart Device Framework by OpenNETCF.org that contains a wrapper class for the Connection Manager:
http://www.opennetcf.org/downloads/bin/SmartDeviceFramework14.zip
It is free for any commercial or noncommercial purpose up to the version 1.4. It also includes the source code, so you might either use it as is or as a reference for your own implementation if you prefer.

(solution taken from our website at http://forum.rebex.net/questions/503/how-to-establish-a-gprs-connection-for-ftp-use-on-net-cf)

维持三分热 2024-09-17 06:52:05

显式创建该连接真的很重要吗?如果您启动任何传出(例如,不是本地主机)连接(例如 HttpWebRequest),操作系统将使用首选连接(可以是 GPRS)自动连接到 Internet。

Is it really important to explicitly create that connection? If you initiate any outgoing (eg. not localhost) connection (like a HttpWebRequest), the OS will automatically connect to the Internet using the preferred connection, which can be GPRS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文