<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 24.05.2017 um 13:37 schrieb Bruno Jesus <<a href="mailto:00cpxxx@gmail.com" class="">00cpxxx@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hi, this seems to be the ASCII version of GetAdapterIndex, can't you</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">call getInterfaceIndexByName and avoid the new #include?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div>I’m not sure what you mean by "ASCII version“. getInterfaceIndexByName also accepts a const char * rather than a WCHAR *. It seems to be the non-Microsoft version of getInterfaceIndexByName though.<div class=""><br class=""></div><div class="">getInterfaceIndexByName is just a wrapper around if_nametoindex. If I wrap IPHLP_if_nametoindex to getInterfaceByName I’d simply undo all the work getInterfaceByName does (or well, the part where it returns ERROR_INVALID_DATA instead of 0. I’m not sure if avoiding the #include is worth that. I’ll send a version that does that in a bit, you can then sign off on the one you prefer :-)</div><div class=""><br class=""></div></body></html>