Open shouhujishu opened 3 months ago
That is odd. I'm running the same OS ver and get a list of like 50 interfaces. Try some different flag values and see if the absence remains.
That is odd. I'm running the same OS ver and get a list of like 50 interfaces. Try some different flag values and see if the absence remains.
Thank you for your reply. I have tried to switch different flags, and the result is normal. Only the GatewayAddresses enumeration is always empty.
Are you running your code as 32 or 64 bit? Can you try with second param as , ADDRESS_FAMILY.AF_UNSPEC
?
IpHlpApi.GetAdaptersAddresses(Vanara.PInvoke.IpHlpApi.GetAdaptersAddressesFlags.GAA_FLAG_INCLUDE_ALL_INTERFACES); The gateway list is always zero when iterating over the results os: windows11 23H2 Thanks for the help