_NetworkState.IsDestinationReachable(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether a connection can be made to the specified network destination.
public:
bool IsDestinationReachable(System::String ^ bstrDestination);
public bool IsDestinationReachable (string bstrDestination);
abstract member IsDestinationReachable : string -> bool
Public Function IsDestinationReachable (bstrDestination As String) As Boolean
Parameters
- bstrDestination
- String
Specifies the location to check for network connectivity as a Uniform Resource Locator (URL), universal naming convention (UNC) path, or IP address.
Returns
true if a connection can be made to the specified URL, UNC path, or IP address; otherwise, false.
Remarks
The value specified for bstrDestination
must be either a UNC path that includes a server name and a share name, such as @"\\MyServer\MyShare", or a URL that begins with one of the following protocol identifiers: http, https, or file.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for