共用方式為


_Application3.IsDestinationReachable 方法

取得一個值,以表示目的地電腦指定的統一資源定位器 (URL)、通用命名慣例 (UNC) 路徑或 IP 位址,是否能與用戶端電腦相互連線。

**命名空間:**Microsoft.Office.Interop.InfoPath
**組件:**Microsoft.Office.Interop.InfoPath (於 microsoft.office.interop.infopath.dll 中)

語法

'宣告
<DispIdAttribute(16)> _
Function IsDestinationReachable ( _
    <InAttribute> bstrDestination As String _
) As Boolean
'用途
Dim instance As _Application3
Dim bstrDestination As String
Dim returnValue As Boolean

returnValue = instance.IsDestinationReachable(bstrDestination)
[DispIdAttribute(16)] 
bool IsDestinationReachable (
    [InAttribute] string bstrDestination
)

參數

  • bstrDestination
    指定位置以檢查網路的連線能力。IP 位址、UNC 路徑或 URL 是可接受的值。

傳回值

true 表示可以連接到指定的 URL、UNC 或 IP 位址,否則為 false

備註

如果是 UNC 和 URL 字串,只包括伺服器名稱的值才是有效的,例如,http://MyServer 或 \\MyServer。若是像 http://MyServer/MyVirtualDirectory 或 \\MyServer\MyShare,則視為無效。

請參閱

參考

_Application3 介面
_Application3 成員
Microsoft.Office.Interop.InfoPath 命名空間