Platform SDK: Internet Protocol Helper |
The GetBestRoute function retrieves the best route to the specified destination IP address.
DWORD GetBestRoute( DWORD dwDestAddr, // destination IP address DWORD dwSourceAddr, // local source IP address PMIB_IPFORWARDROW pBestRoute // best route for dest. addr. );
This parameter is optional. The caller may specify zero for this parameter.
If the function succeeds, the return value is NO_ERROR.
If the function fails, use FormatMessage to obtain the message string for the returned error.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in Iphlpapi.h.
Library: Use Iphlpapi.lib.