简体   繁体   English

以编程方式拨打 Windows CE 中的现有连接?

[英]Programmatically dial an existing connection in 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. Windows CE 的 RAS API 让我哭了,作为 C# 程序员,我无法对 MSDN 上提供的绝大多数功能的文档进行正面或反面。

I've already scoured the NET for code which allows me to list ACTIVE connections, check a connections status and hang up if needed.我已经在 NET 中搜索了允许我列出活动连接、检查连接状态并在需要时挂断的代码。

Now what I need is to establish a connection, one that already has been created in Windows CE.现在我需要建立一个连接,该连接已经在 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" .该连接有一些额外的参数,如波特率、流量控制和一个“额外设置”字符串,如+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".现在,我从 MSDN 文档中了解到的一点是,我不能只告诉 Windows CE“拨打此连接”。 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.任何帮助,将不胜感激。

With RAS, you have to enumerate the entries, then use those to tell RAS which entry you want to dial.使用 RAS,您必须枚举条目,然后使用这些条目告诉 RAS 您要拨打哪个条目。 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 ). RAS 没有添加额外信息的规定 - 必须使用 TAPI 完成(也有一个共享源项目)。 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.一般来说,我更喜欢在可能的情况下只使用控制面板 UI 来设置这些参数,并且只使用 TAPI 来枚举和拨号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM