在 Windows CE 中以编程方式拨打现有连接?
Windows CE 的 RAS API 让我哭了,作为一名 C# 程序员,我无法理解 MSDN 上有关绝大多数可用功能的文档。
我已经在 NET 上搜索了允许我列出活动连接、检查连接状态并在需要时挂断的代码。
现在我需要建立一个连接,该连接已在 Windows CE 中创建。该连接有一些额外的参数,如波特率、流量控制和“额外设置”字符串,如 +CGDCONT=1,"IP","internet"
。
现在,我从 MSDN 文档中了解到的一点是,我不能只是告诉 Windows CE“拨打此连接”。我需要检索连接的参数(电话号码、用户名、密码,我还假设我需要波特率等额外参数),然后告诉系统拨打该参数。
此时我不知所措,因为我不知道该怎么做。任何帮助将不胜感激。
The RAS API for Windows CE is making me cry and, as a C# programmer, I can't make heads or tails of the documentation on MSDN regarding the vast majority of the functions which are available.
I've already scoured the NET for code which allows me to list ACTIVE connections, check a connections status and hang up if needed.
Now what I need is to establish a connection, one that already has been created in Windows CE. The connection has some extra parameters like baud rate, flow control and an "extra settings" string along the lines of +CGDCONT=1,"IP","internet"
.
Now, what little I managed to understand from the MSDN documentation, I can't just tell Windows CE to "dial this connection". I need to retrieve the connections' parameters (phone number, user name, password and I also assume I need those extra parameters like baud rate and so on) and then tell the system to dial THAT.
At this point I'm at a loss, as I've no idea how to do that. Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 RAS,您必须枚举条目,然后使用这些条目告诉 RAS 您要拨打哪个条目。是的,这有点复杂,但是您见过这个共享源代码项目吗?它将简化基本拨号。
现在添加额外的设置是一个不同的故事,这几乎是一场噩梦。 RAS 没有添加额外信息的规定 - 这必须使用 TAPI 来完成(也有一个共享源项目) )。一般来说,我更喜欢在可以的情况下仅使用控制面板 UI 来设置这些参数,并且仅使用 TAPI 进行枚举和拨号。
With RAS, you have to enumerate the entries, then use those to tell RAS which entry you want to dial. It's a bit convoluted, yes, but have you seen this shared-source project? It will simplify basic dialing.
Now adding extra settings is a different story, and it's pretty much a nightmare. RAS doesn't have provisions for adding that extra info - that has to be done with TAPI (there's a shared source project for that too). Generally speaking I prefer to just use the control panel UI to set those parameters when I can and just use TAPI to enumerate and dial.