0 out of 3 rated this helpful - Rate this topic

GetBestRoute function

Applies to: desktop apps only

The GetBestRoute function retrieves the best route to the specified destination IP address.

Syntax

DWORD GetBestRoute(
  __in   DWORD dwDestAddr,
  __in   DWORD dwSourceAddr,
  __out  PMIB_IPFORWARDROW pBestRoute
);

Parameters

dwDestAddr [in]

Destination IP address for which to obtain the best route.

dwSourceAddr [in]

Source IP address. This IP address corresponds to an interface on the local computer. If multiple best routes to the destination address exist, the function selects the route that uses this interface.

This parameter is optional. The caller may specify zero for this parameter.

pBestRoute [out]

Pointer to a MIB_IPFORWARDROW structure containing the best route for the IP address specified by dwDestAddr.

Return value

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.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Iphlpapi.h

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

IP Helper Start Page
IP Helper Function Reference
GetBestInterface
MIB_IPFORWARDROW

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Strange error code
1231, (Сетевая папка недоступна. За информацией о разрешении проблем в сети обратитесь к справочной системе Windows.)

I guess english translation will be like "Network folder is unreachable"

What does it mean?

P.S. I guess that means that there is no route (direct route?) to specified host