IsDestinationReachable function

The IsDestinationReachable function determines whether or not a specified destination can be reached, and provides Quality of Connection (QOC) information for a destination.

Windows Vista and later, Windows Server 2008 and later:  This function is not supported and always returns ERROR_CALL_NOT_IMPLEMENTED.

Syntax


BOOL IsDestinationReachable(
  _In_    LPCSTR    lpszDestination,
  _Inout_ LPQOCINFO lpQOCInfo
);

Parameters

lpszDestination [in]

A pointer to a null-terminated string that specifies a destination. The destination can be an IP address, UNC name, or URL.

lpQOCInfo [in, out]

A pointer to the QOCINFO structure that receives the Quality of Connection (QOC) information. You can supply a NULL pointer if you do not want to receive the QOC information.

Return value

Return codeDescription
TRUE

A destination can be reached.

FALSE

A destination cannot be reached. To get extended error information, call GetLastError.

ERROR_CALL_NOT_IMPLEMENTED

This function is not available on Windows Vista.

 

Remarks

Client applications use this function to determine the QOC information before proceeding with network operations. For standalone computers that are directly connected to a network through a network card or remote access server (RAS), this function generates minimal network traffic with RPC calls to the nearest router. For computers that are part of a network where a destination can be reached by using RAS or a network gateway, this function pings a destination to generate accurate QOC information.

This function is only available for TCP/IP connections. A caller supplies the buffer for the QOCINFO structure, and must release the memory when it is not needed.

Starting with applications designed for Windows Vista and Windows Server 2008, developers should consider using the Network List Manager instead of this function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Sensapi.h

Library

Sensapi.lib

DLL

Sensapi.dll

Unicode and ANSI names

IsDestinationReachableW (Unicode) and IsDestinationReachableA (ANSI)

See also

About System Event Notification Service
IsNetworkAlive
QOCINFO

 

 

Show: