关闭GPRS连接在Windows Mobile [英] Closing GPRS Connections On Windows Mobile

查看:213
本文介绍了关闭GPRS连接在Windows Mobile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能获得所有打开或缓存的gprs在Windows Mobile和方案强迫他们连接关闭?

Is it possible to get all open or cached gprs connections on windows mobile and programmatic force them to close?

我一直都盼望在连接管理器API,但不能似乎找方法我做到这一点。

Ive been looking at connection manager api but cant seem to find methods I to do this.

问候

托尼

推荐答案

连接管理器可以,你不再使用通过调用 ConnMgrReleaseConnection ,但这并不强行关闭连接。它根据在注册表(HKEY_LOCAL_MACHINE\Comm\ConnMgr\Planner\Settings)中所定义的生存期的缓存,以及在释放请求传递的任何信息是封闭的。 (顺便说一句,这些API被包裹在 SDF 的OpenNETCF的ConnectionManager对象)。

Connection Manager can be notified that you're no longer using the connection by calling ConnMgrReleaseConnection, but that does not forcibly close the connection. It is closed based on the lifetime caching defined in the registry (HKEY_LOCAL_MACHINE\Comm\ConnMgr\Planner\Settings), as well as any info passed in the Release request. (BTW, these APIs are wrapped in the OpenNETCF ConnectionManager objects in the SDF).

要强行关闭连接的唯一方法是使用 RAS 枚举所有设备连接,找到你后的人,并关闭它。请注意,如果你这样做,的ConnectionManager不知道它已经关闭,所以它会尝试使用该连接的下一次被打乱。通常情况下它会在内部得到一个错误,并再次尝试打开一个新的连接,一切都很好,但情况因人而异。

The only way to forcibly close the connection is to use RAS to enumerate all device connections, find the one you're after, and close it. Be aware that if you do this, ConnectionManager doesn't know that it's been closed, so it's going to be upset the next time it tries to use that connection. Typically it will get an error internally and try to open a new connection again and all is well, but YMMV.

这篇关于关闭GPRS连接在Windows Mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆