如何检索所有 RAS 连接?
我想要获取“控制面板”下“网络连接”中显示的所有 RAS 连接(拨号、宽带、VPN 等)。这里和网络上有一些解决方案可以做到这一点,但它们都是关于获取活动(连接)连接。
我该怎么做?如何获取所有活动和非活动 RAS 连接?有或没有“DotRas”。
I want to get all RAS connections (Dial-up, Broadband, VPN, etc.) as they appear in my "Network Connections" under "Control Panel". There are some solutions here and on the web to do this, but they are all about getting Active (connected) Connections.
How can I do this? How can I get all active and inactive RAS connections? With or without "DotRas".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DotRas SDK 中有一个组件用于处理电话簿条目的管理。请记住,Windows 使用两本电话簿,一本位于所有用户的配置文件中,另一本位于当前用户的配置文件中。因此,如果您想获取在那里看到的所有条目的列表,则需要访问两个电话簿。
上面的示例相当有限,因此要获得更完整的示例,请查看 SDK 中包含的示例。
有关上述 SDK 的下载链接,请参阅官方网站:http://dotras.codeplex.com
希望有帮助!
There is a component as part of the DotRas SDK which handles management of the phone book entries. Keep in mind that there are two phone books in use by Windows, the one in the all users' profile and the current users' profile. So if you're trying to get a list all the entries that you'd see there, you'd need to access both phone books.
The above example is rather limited so for more complete examples check the examples included with the SDK.
For a download link to the above mentioned SDK, see the official website at: http://dotras.codeplex.com
Hope that helps!
如果你想动态获取所有 RAS 连接而不需要 .pbk 文件“路径”
if you want dynamically get all RAS connection without .pbk file "path"