I looked at the GetAdaptersInfo() sample in MSDN:
http://msdn.microsoft.com/en-us/library/aa365917%28VS.85%29.aspx
and noticed that while the sample attempts to iterate through ALL adapters, it only allocates memory for the first one.
Is this a bug?
If not, why not? Do all adapters have the same info size?
To further clarify my question: I understood the role of the double call to malloc in the sample. What I don't understand is why is it outside the loop. If there is only one adapter in the system, of course there is no problem. But what happens when there are multiple adapters? Is this a bug?
Thanks.