iphlpapi: fix GetAdaptersAddresses return values
timo.teras at iki.fi
Thu Dec 23 10:13:49 CST 2010
We should return ERROR_BUFFER_OVERFLOW always if the buffer
pointer is NULL (regardless of old buffer length).
Additionally, while strictly not defined, Windows seems to always
return the WCHAR members as valid pointers. This is easily verified
by checking the output of the example code at:
In Windows it will not print (null) ever. Some programs seem to
rely on this behaviour.
One test case which does not work at all without these changes is
dlls/iphlpapi/iphlpapi_main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 766 bytes
Desc: not available
More information about the wine-patches