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: Not supported. This function always returns ERROR_CALL_NOT_IMPLEMENTED.
Syntax
BOOL IsDestinationReachable(
__in LPCSTR lpszDestination,
__inout LPQOCINFO lpQOCInfo
);
Parameters
- lpszDestination
-
A pointer to a null-terminated string that specifies a destination. The destination can be an IP address, UNC name, or URL.
- lpQOCInfo
-
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 code | Description |
| 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.
Requirements
| Client | Requires Windows XP or Windows 2000 Professional. |
| Server | Requires Windows Server 2003 or Windows 2000 Server. |
| Header | Declared in Sensapi.h. |
| Library | Use Sensapi.lib. |
| DLL | Requires Sensapi.dll. |
| Unicode | Implemented as IsDestinationReachableW (Unicode) and IsDestinationReachableA (ANSI). |
See Also
About System Event Notification Service
IsNetworkAlive
QOCINFO
Send comments about this topic to Microsoft
Build date: 2/7/2008