Using Win32 functions in Visual FoxPro Image Gallery
IP Helper
..msdn
GetAdaptersAddresses
GetAdaptersInfo
GetBestInterface
GetBestRoute
GetIfEntry
GetInterfaceInfo
GetIpAddrTable
GetIpNetTable
GetIpStatistics
GetNetworkParams
GetNumberOfInterfaces
GetRTTAndHopCount
GetTcp6Table
GetTcpStatistics
GetTcpTable
GetUdpTable
IcmpCloseHandle
IcmpCreateFile
IcmpSendEcho
if_indextoname
if_nametoindex
IpReleaseAddress
IpRenewAddress
SendARP
Code examples:
GetBestInterface
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the index of the interface that has the best route to the specified IPv4 address.
Code examples:
Declaration:
DWORD GetBestInterface(
    IPAddr dwDestAddr,
    PDWORD pdwBestIfIndex
);
FoxPro declaration:
DECLARE LONG GetBestInterface IN Iphlpapi;
    LONG dwDestAddr,;
    LONG @pdwBestIfIndex
Parameters:
dwDestAddr
[in] The destination IPv4 address for which to retrieve the interface that has the best route, in the form of an IPAddr structure.

pdwBestIfIndex
[out] A pointer to a DWORD variable that receives the index of the interface that has the best route to the IPv4 address specified by dwDestAddr.
Return value:
If the function succeeds, the return value is NO_ERROR (0).
My comment:
LOCAL nDstIP, nIIndex

nDstIP = inet_addr("66.94.234.13")
nIIndex=0

IF GetBestInterface(nDstIP, @nIIndex) = 0
        ? "Index of the interface", nIIndex
ENDIF

See also: GetBestRoute, GetNumberOfInterfaces, GetIfEntry.
Word Index links for the GetBestInterface :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-01-23 17:27:26
Modified: 2007-01-23 17:30:59
Visited in last 7 days: 6
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.43.96)
13 sec.Function: 'ClipCursor'
27 sec.Function: 'SetConsoleCursorPosition'
41 sec.Function: 'GetCursorInfo'
54 sec.Function: 'GetWindowThreadProcessId'
1.13 min.Function: 'DestroyWindow'
1.37 min.Function: 'CryptEncrypt'
1.63 min.Function: 'HeapValidate'
1.87 min.Function: 'GetFocus'
2.1 min.Function: 'if_indextoname'
2.33 min.Function: 'ReadEventLog'
Google
Advertise here!