DECLARELONG 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
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.