Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何编写代码以通过 Windows VPN 客户端进行连接?
我希望这个过程在登录期间不可见地发生。
远程访问服务 API 是您所追求的,特别是 RasDial 函数:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa377004(v=vs.85).aspx
请记住,您必须在应用程序退出之前调用 RasHangUp,以便干净地关闭连接。
不要为代码烦恼。您可以将 Windows 配置为在登录时自动连接到 vpn。