Show All

# IsDestinationReachable Method

Returns a Boolean value indicating whether the specified Uniform Resource Locator (URL), universal naming convention (UNC) path, or IP address of the destination computer can be connected to from the client computer.

expression.IsDestinationReachable(ByVal bstrDestination As String, [ByVal bstrBehavior As String ) As Boolean

expression Required. An expression that returns a reference to the Application object.

bstrDestination Required String. Specifies the location to check for network connectivity. IP addresses, a UNC paths, or a URLs are acceptable values.

returns A Boolean value indicating whether the destination is reachable. True if the specified destination can be connected to; otherwise, False.

## Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Note If an IP address is specified, the security level for this method becomes level 3. It is not possible to determine the domain from the IP address, therefore the caller must have the full trust permission.

## Remarks

For UNC and URL strings, valid values are those including only the server name, for example http://MyServer or \\MyServer. Values such as http://MyServer/MyVirtualDirectory or \\MyServer\MyShare are not considered valid.

Note This object model member is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp