Cleanup GetAdaptersAddresses.
authorSylvain Petreolle <spetreolle@yahoo.fr>
Sun, 14 Jun 2009 14:10:32 +0000 (14:10 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Sun, 14 Jun 2009 14:10:32 +0000 (14:10 +0000)
Add GetIfTable2 and GetIfEntry2 stubs
based on janderwald patch

svn path=/trunk/; revision=41409

reactos/dll/win32/iphlpapi/iphlpapi.rbuild
reactos/dll/win32/iphlpapi/iphlpapi.spec
reactos/dll/win32/iphlpapi/iphlpapi_main.c
reactos/dll/win32/iphlpapi/iphlpapi_private.h

index 7e6919c..22385f0 100644 (file)
@@ -1,6 +1,6 @@
 <module name="iphlpapi" type="win32dll" baseaddress="${BASEADDRESS_IPHLPAPI}" installbase="system32" installname="iphlpapi.dll" allowwarnings="true" unicode="yes" crt="msvcrt">
        <importlibrary definition="iphlpapi.spec" />
-       <include base="iphlpapi">include</include>
+       <include base="iphlpapi">.</include>
        <include base="ReactOS">include/reactos/wine</include>
        <library>wine</library>
        <library>ntdll</library>
index 5ac8823..0f6f7af 100644 (file)
 @ stub GetIcmpStatsFromStack
 @ stub GetIcmpStatsFromStackEx
 @ stdcall GetIfEntry( ptr )
+@ stdcall GetIfEntry2( ptr )
 @ stub GetIfEntryFromStack
 @ stdcall GetIfTable( ptr ptr long )
+@ stdcall GetIfTable2(ptr)
 @ stub GetIfTableFromStack
 @ stub GetIgmpList
 @ stdcall GetInterfaceInfo( ptr ptr )
index 2ab7909..6fcdfce 100644 (file)
@@ -2179,9 +2179,12 @@ PIP_ADAPTER_ORDER_MAP WINAPI GetAdapterOrderMap(VOID)
 DWORD WINAPI GetAdaptersAddresses(ULONG Family,ULONG Flags,PVOID Reserved,PIP_ADAPTER_ADDRESSES pAdapterAddresses,PULONG pOutBufLen)
 {
     if (!pOutBufLen) return ERROR_INVALID_PARAMETER;
+    if (!pAdapterAddresses || *pOutBufLen == 0)
+      return ERROR_BUFFER_OVERFLOW;
+    if (Reserved) return ERROR_INVALID_PARAMETER;
 
     FIXME(":stub\n");
-    return 0L;
+    return ERROR_NO_DATA;
 }
 
 /*
@@ -2220,4 +2223,33 @@ DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX pStats,DWORD dwFamily)
     return 0L;
 }
 
+/******************************************************************
+ *    GetIfTable2 (IPHLPAPI.@)
+ *
+ * PARAMS
+ *  pIfTable [In/Out]
+ */
+NETIOAPI_API WINAPI GetIfTable2(PMIB_IF_TABLE2 *pIfTable)
+{
+    UNIMPLEMENTED;
+    return ERROR_NOT_SUPPORTED;
+}
+
+/******************************************************************
+ *    GetIfEntry2 (IPHLPAPI.@)
+ *
+ * PARAMS
+ *  pIfRow [In/Out]
+ */
+NETIOAPI_API WINAPI GetIfEntry2(IN OUT PMIB_IF_ROW2 pIfRow)
+{
+  TRACE("pIfRow %p\n", pIfRow);
+  if (!pIfRow)
+    return ERROR_INVALID_PARAMETER;
+    
+  UNIMPLEMENTED;
+  return ERROR_NOT_SUPPORTED;
+}
+
 
index 98d3f73..a41934c 100644 (file)
@@ -23,6 +23,7 @@
 #define _WIN32_WINNT 0x500
 #define WIN32_NO_STATUS
 #include <winsock2.h>
+#include <ws2tcpip.h>
 #include <windows.h>
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
@@ -32,6 +33,7 @@
 #include "resinfo.h"
 #include "wine/debug.h"
 
+//#include "ntddndis.h"
 #include "ddk/tdiinfo.h"
 #include "tcpioctl.h"