[PATCH] iphlpapi: Implement if_nametoindex.

Stefan Dösinger stefan at codeweavers.com
Wed May 24 07:17:58 CDT 2017


> Am 24.05.2017 um 13:37 schrieb Bruno Jesus <00cpxxx at gmail.com>:
> 
> Hi, this seems to be the ASCII version of GetAdapterIndex, can't you
> call getInterfaceIndexByName and avoid the new #include?
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.

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 :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170524/1bd2c4c4/attachment-0001.html>


More information about the wine-devel mailing list