2505.html
来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 22 行
HTML
22 行
<html>
<head>
<title>Re: 关于拨号网路</title>
</head>
<BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="red" VLINK="#808080" ALINK="">
<center>
<h1>Re: 关于拨号网路</h1>
</center>
<HR><p>
Posted by <a href="mailto:johnnyab@ms8.hinet.net">Johnny Guo</a> on April 05, 1998 at 08:21:11:<p>
In Reply to: <a href="2485.html"><b>关于拨号网路</b></a> posted by Lily on April 02, 1998 at 19:39:02:<p>
<br>: 不知是否有方法可以测知拨号网路拨接成功或是失败 ?<p>先宣告如下<br>Public Const RAS_MaxEntryName = 256<br>Public Const RAS_MaxDeviceName = 128<br>Public Const RAS_MaxDeviceType = 16<p>Type RASCONN<br> dwSize As Long<br> hrasconn As Integer<br> szEntryName(RAS_MaxEntryName + 1) As Byte<br> szDeviceType(RAS_MaxDeviceType + 1) As Byte<br> szDeviceName(RAS_MaxDeviceName + 1) As Byte<br>End Type<p><br>Public Declare Function RasEnumConnections& Lib "rasapi32" Alias "RasEnumConnectionsA" (lprasconn As RASCONN, lpcb As Long, lpConnect As Long)<p>再 call 底下的 function<br>Private Function AlreadyConnect() As Boolean<br> Dim Conn() As RASCONN<br> Dim dl&, size&, validConnection&<br> ReDim Conn(0)<br> Conn(0).dwSize = Len(Conn(0))<br> size = Len(Conn(0))<br> dl& = RasEnumConnections(Conn(0), size, validConnection)<br> If dl& = 0 Then<br> If validConnection > 0 Then<br> AlreadyConnect = True<br> Else<br> AlreadyConnect = False<br> End If<br> Else<br> AlreadyConnect = False<br> End If<br>End Function<br>
<br>
<p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 2505-->
</ul><!--end: 2505-->
<br><HR><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?