How get using nic id, if have multiple nic
-
18-02-2021 - |
Question
I have multiple nic. and each nic is setting different ip range (routing table).
if i connect to specific ip, how get nic id actually using nic to connect the ip?
i have short english, sorry ^^;;
Solution
I'm working on a project which requires similar functionality. You could try the function GetBestInterface which takes an IP and returns the interface index of the best interface to that IP.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365920%28v=VS.85%29.aspx
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow