Commit f5095df9 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

iphlpapi: Win64 printf format warning fixes.

parent 2abe8348
...@@ -6,7 +6,6 @@ MODULE = iphlpapi.dll ...@@ -6,7 +6,6 @@ MODULE = iphlpapi.dll
IMPORTLIB = libiphlpapi.$(IMPLIBEXT) IMPORTLIB = libiphlpapi.$(IMPLIBEXT)
IMPORTS = advapi32 kernel32 IMPORTS = advapi32 kernel32
EXTRALIBS = @RESOLVLIBS@ EXTRALIBS = @RESOLVLIBS@
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \ C_SRCS = \
ifenum.c \ ifenum.c \
......
...@@ -111,7 +111,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable, ...@@ -111,7 +111,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIfTable %p, bOrder %d, heap %p, flags 0x%08lx\n", ppIfTable, TRACE("ppIfTable %p, bOrder %d, heap %p, flags 0x%08x\n", ppIfTable,
bOrder, heap, flags); bOrder, heap, flags);
if (!ppIfTable) if (!ppIfTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -124,7 +124,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable, ...@@ -124,7 +124,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable,
ret = GetIfTable(*ppIfTable, &dwSize, bOrder); ret = GetIfTable(*ppIfTable, &dwSize, bOrder);
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -163,13 +163,13 @@ DWORD WINAPI AllocateAndGetIpAddrTableFromStack(PMIB_IPADDRTABLE *ppIpAddrTable, ...@@ -163,13 +163,13 @@ DWORD WINAPI AllocateAndGetIpAddrTableFromStack(PMIB_IPADDRTABLE *ppIpAddrTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIpAddrTable %p, bOrder %d, heap %p, flags 0x%08lx\n", TRACE("ppIpAddrTable %p, bOrder %d, heap %p, flags 0x%08x\n",
ppIpAddrTable, bOrder, heap, flags); ppIpAddrTable, bOrder, heap, flags);
ret = getIPAddrTable(ppIpAddrTable, heap, flags); ret = getIPAddrTable(ppIpAddrTable, heap, flags);
if (!ret && bOrder) if (!ret && bOrder)
qsort((*ppIpAddrTable)->table, (*ppIpAddrTable)->dwNumEntries, qsort((*ppIpAddrTable)->table, (*ppIpAddrTable)->dwNumEntries,
sizeof(MIB_IPADDRROW), IpAddrTableSorter); sizeof(MIB_IPADDRROW), IpAddrTableSorter);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -220,13 +220,13 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE * ...@@ -220,13 +220,13 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *
{ {
DWORD ret; DWORD ret;
TRACE("ppIpForwardTable %p, bOrder %d, heap %p, flags 0x%08lx\n", TRACE("ppIpForwardTable %p, bOrder %d, heap %p, flags 0x%08x\n",
ppIpForwardTable, bOrder, heap, flags); ppIpForwardTable, bOrder, heap, flags);
ret = getRouteTable(ppIpForwardTable, heap, flags); ret = getRouteTable(ppIpForwardTable, heap, flags);
if (!ret && bOrder) if (!ret && bOrder)
qsort((*ppIpForwardTable)->table, (*ppIpForwardTable)->dwNumEntries, qsort((*ppIpForwardTable)->table, (*ppIpForwardTable)->dwNumEntries,
sizeof(MIB_IPFORWARDROW), IpForwardTableSorter); sizeof(MIB_IPFORWARDROW), IpForwardTableSorter);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -265,13 +265,13 @@ DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, ...@@ -265,13 +265,13 @@ DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIpNetTable %p, bOrder %d, heap %p, flags 0x%08lx\n", TRACE("ppIpNetTable %p, bOrder %d, heap %p, flags 0x%08x\n",
ppIpNetTable, bOrder, heap, flags); ppIpNetTable, bOrder, heap, flags);
ret = getArpTable(ppIpNetTable, heap, flags); ret = getArpTable(ppIpNetTable, heap, flags);
if (!ret && bOrder) if (!ret && bOrder)
qsort((*ppIpNetTable)->table, (*ppIpNetTable)->dwNumEntries, qsort((*ppIpNetTable)->table, (*ppIpNetTable)->dwNumEntries,
sizeof(MIB_IPADDRROW), IpNetTableSorter); sizeof(MIB_IPADDRROW), IpNetTableSorter);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -322,13 +322,13 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable, ...@@ -322,13 +322,13 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppTcpTable %p, bOrder %d, heap %p, flags 0x%08lx\n", TRACE("ppTcpTable %p, bOrder %d, heap %p, flags 0x%08x\n",
ppTcpTable, bOrder, heap, flags); ppTcpTable, bOrder, heap, flags);
ret = getTcpTable(ppTcpTable, heap, flags); ret = getTcpTable(ppTcpTable, heap, flags);
if (!ret && bOrder) if (!ret && bOrder)
qsort((*ppTcpTable)->table, (*ppTcpTable)->dwNumEntries, qsort((*ppTcpTable)->table, (*ppTcpTable)->dwNumEntries,
sizeof(MIB_TCPROW), TcpTableSorter); sizeof(MIB_TCPROW), TcpTableSorter);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -373,13 +373,13 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, ...@@ -373,13 +373,13 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppUdpTable %p, bOrder %d, heap %p, flags 0x%08lx\n", TRACE("ppUdpTable %p, bOrder %d, heap %p, flags 0x%08x\n",
ppUdpTable, bOrder, heap, flags); ppUdpTable, bOrder, heap, flags);
ret = getUdpTable(ppUdpTable, heap, flags); ret = getUdpTable(ppUdpTable, heap, flags);
if (!ret && bOrder) if (!ret && bOrder)
qsort((*ppUdpTable)->table, (*ppUdpTable)->dwNumEntries, qsort((*ppUdpTable)->table, (*ppUdpTable)->dwNumEntries,
sizeof(MIB_UDPROW), UdpTableSorter); sizeof(MIB_UDPROW), UdpTableSorter);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -449,7 +449,7 @@ DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW pArpEntry) ...@@ -449,7 +449,7 @@ DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW pArpEntry)
*/ */
DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex) DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
{ {
FIXME("(dwAddress 0x%08lx, dwMask 0x%08lx, dwIfIndex 0x%08lx): stub\n", FIXME("(dwAddress 0x%08x, dwMask 0x%08x, dwIfIndex 0x%08x): stub\n",
dwAddress, dwMask, dwIfIndex); dwAddress, dwMask, dwIfIndex);
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
...@@ -472,7 +472,7 @@ DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex) ...@@ -472,7 +472,7 @@ DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
*/ */
DWORD WINAPI DeleteIPAddress(ULONG NTEContext) DWORD WINAPI DeleteIPAddress(ULONG NTEContext)
{ {
FIXME("(NTEContext %ld): stub\n", NTEContext); FIXME("(NTEContext %d): stub\n", NTEContext);
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
...@@ -542,7 +542,7 @@ DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW pArpEntry) ...@@ -542,7 +542,7 @@ DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW pArpEntry)
*/ */
DWORD WINAPI DeleteProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex) DWORD WINAPI DeleteProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
{ {
FIXME("(dwAddress 0x%08lx, dwMask 0x%08lx, dwIfIndex 0x%08lx): stub\n", FIXME("(dwAddress 0x%08x, dwMask 0x%08x, dwIfIndex 0x%08x): stub\n",
dwAddress, dwMask, dwIfIndex); dwAddress, dwMask, dwIfIndex);
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
...@@ -591,7 +591,7 @@ DWORD WINAPI EnableRouter(HANDLE * pHandle, OVERLAPPED * pOverlapped) ...@@ -591,7 +591,7 @@ DWORD WINAPI EnableRouter(HANDLE * pHandle, OVERLAPPED * pOverlapped)
*/ */
DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex) DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex)
{ {
FIXME("(dwIfIndex 0x%08lx): stub\n", dwIfIndex); FIXME("(dwIfIndex 0x%08x): stub\n", dwIfIndex);
/* this flushes the arp cache of the given index */ /* this flushes the arp cache of the given index */
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
...@@ -761,7 +761,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen) ...@@ -761,7 +761,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
else else
ret = ERROR_NO_DATA; ret = ERROR_NO_DATA;
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -793,7 +793,7 @@ DWORD WINAPI GetBestInterface(IPAddr dwDestAddr, PDWORD pdwBestIfIndex) ...@@ -793,7 +793,7 @@ DWORD WINAPI GetBestInterface(IPAddr dwDestAddr, PDWORD pdwBestIfIndex)
if (ret == ERROR_SUCCESS) if (ret == ERROR_SUCCESS)
*pdwBestIfIndex = ipRow.dwForwardIfIndex; *pdwBestIfIndex = ipRow.dwForwardIfIndex;
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -817,7 +817,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO ...@@ -817,7 +817,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
PMIB_IPFORWARDTABLE table; PMIB_IPFORWARDTABLE table;
DWORD ret; DWORD ret;
TRACE("dwDestAddr 0x%08lx, dwSourceAddr 0x%08lx, pBestRoute %p\n", dwDestAddr, TRACE("dwDestAddr 0x%08x, dwSourceAddr 0x%08x, pBestRoute %p\n", dwDestAddr,
dwSourceAddr, pBestRoute); dwSourceAddr, pBestRoute);
if (!pBestRoute) if (!pBestRoute)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
...@@ -853,7 +853,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO ...@@ -853,7 +853,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
} }
else else
ret = ERROR_OUTOFMEMORY; ret = ERROR_OUTOFMEMORY;
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -876,7 +876,7 @@ DWORD WINAPI GetFriendlyIfIndex(DWORD IfIndex) ...@@ -876,7 +876,7 @@ DWORD WINAPI GetFriendlyIfIndex(DWORD IfIndex)
/* windows doesn't validate these, either, just makes sure the top byte is /* windows doesn't validate these, either, just makes sure the top byte is
cleared. I assume my ifenum module never gives an index with the top cleared. I assume my ifenum module never gives an index with the top
byte set. */ byte set. */
TRACE("returning %ld\n", IfIndex); TRACE("returning %d\n", IfIndex);
return IfIndex; return IfIndex;
} }
...@@ -899,7 +899,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP pStats) ...@@ -899,7 +899,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP pStats)
TRACE("pStats %p\n", pStats); TRACE("pStats %p\n", pStats);
ret = getICMPStats(pStats); ret = getICMPStats(pStats);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -935,7 +935,7 @@ DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow) ...@@ -935,7 +935,7 @@ DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow)
} }
else else
ret = ERROR_INVALID_DATA; ret = ERROR_INVALID_DATA;
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -976,7 +976,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder) ...@@ -976,7 +976,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder)
{ {
DWORD ret; DWORD ret;
TRACE("pIfTable %p, pdwSize %p, bOrder %ld\n", pdwSize, pdwSize, TRACE("pIfTable %p, pdwSize %p, bOrder %d\n", pdwSize, pdwSize,
(DWORD)bOrder); (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1019,7 +1019,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder) ...@@ -1019,7 +1019,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder)
ret = ERROR_OUTOFMEMORY; ret = ERROR_OUTOFMEMORY;
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1094,7 +1094,7 @@ DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable, PULONG dwOutBufLen) ...@@ -1094,7 +1094,7 @@ DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable, PULONG dwOutBufLen)
ret = ERROR_OUTOFMEMORY; ret = ERROR_OUTOFMEMORY;
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1124,7 +1124,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL ...@@ -1124,7 +1124,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
{ {
DWORD ret; DWORD ret;
TRACE("pIpAddrTable %p, pdwSize %p, bOrder %ld\n", pIpAddrTable, pdwSize, TRACE("pIpAddrTable %p, pdwSize %p, bOrder %d\n", pIpAddrTable, pdwSize,
(DWORD)bOrder); (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1153,7 +1153,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL ...@@ -1153,7 +1153,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
HeapFree(GetProcessHeap(), 0, table); HeapFree(GetProcessHeap(), 0, table);
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1183,7 +1183,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi ...@@ -1183,7 +1183,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi
{ {
DWORD ret; DWORD ret;
TRACE("pIpForwardTable %p, pdwSize %p, bOrder %ld\n", pIpForwardTable, TRACE("pIpForwardTable %p, pdwSize %p, bOrder %d\n", pIpForwardTable,
pdwSize, (DWORD)bOrder); pdwSize, (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1219,7 +1219,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi ...@@ -1219,7 +1219,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi
} }
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1248,7 +1248,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr ...@@ -1248,7 +1248,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr
{ {
DWORD ret; DWORD ret;
TRACE("pIpNetTable %p, pdwSize %p, bOrder %ld\n", pIpNetTable, pdwSize, TRACE("pIpNetTable %p, pdwSize %p, bOrder %d\n", pIpNetTable, pdwSize,
(DWORD)bOrder); (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1284,7 +1284,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr ...@@ -1284,7 +1284,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr
} }
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1307,7 +1307,7 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS pStats) ...@@ -1307,7 +1307,7 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS pStats)
TRACE("pStats %p\n", pStats); TRACE("pStats %p\n", pStats);
ret = getIPStats(pStats); ret = getIPStats(pStats);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1387,7 +1387,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen) ...@@ -1387,7 +1387,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
/* FIXME: can check whether routing's enabled in /proc/sys/net/ipv4/ip_forward /* FIXME: can check whether routing's enabled in /proc/sys/net/ipv4/ip_forward
I suppose could also check for a listener on port 53 to set EnableDns */ I suppose could also check for a listener on port 53 to set EnableDns */
ret = NO_ERROR; ret = NO_ERROR;
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1414,7 +1414,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf) ...@@ -1414,7 +1414,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
*pdwNumIf = getNumInterfaces(); *pdwNumIf = getNumInterfaces();
ret = NO_ERROR; ret = NO_ERROR;
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1438,7 +1438,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf) ...@@ -1438,7 +1438,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
*/ */
DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen) DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen)
{ {
TRACE("(IfIndex %ld, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex, TRACE("(IfIndex %d, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex,
pPerAdapterInfo, pOutBufLen); pPerAdapterInfo, pOutBufLen);
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
...@@ -1465,7 +1465,7 @@ DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterIn ...@@ -1465,7 +1465,7 @@ DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterIn
*/ */
BOOL WINAPI GetRTTAndHopCount(IPAddr DestIpAddress, PULONG HopCount, ULONG MaxHops, PULONG RTT) BOOL WINAPI GetRTTAndHopCount(IPAddr DestIpAddress, PULONG HopCount, ULONG MaxHops, PULONG RTT)
{ {
FIXME("(DestIpAddress 0x%08lx, HopCount %p, MaxHops %ld, RTT %p): stub\n", FIXME("(DestIpAddress 0x%08lx, HopCount %p, MaxHops %d, RTT %p): stub\n",
DestIpAddress, HopCount, MaxHops, RTT); DestIpAddress, HopCount, MaxHops, RTT);
return FALSE; return FALSE;
} }
...@@ -1489,7 +1489,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS pStats) ...@@ -1489,7 +1489,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS pStats)
TRACE("pStats %p\n", pStats); TRACE("pStats %p\n", pStats);
ret = getTCPStats(pStats); ret = getTCPStats(pStats);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1520,7 +1520,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder) ...@@ -1520,7 +1520,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
{ {
DWORD ret; DWORD ret;
TRACE("pTcpTable %p, pdwSize %p, bOrder %ld\n", pTcpTable, pdwSize, TRACE("pTcpTable %p, pdwSize %p, bOrder %d\n", pTcpTable, pdwSize,
(DWORD)bOrder); (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1557,7 +1557,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder) ...@@ -1557,7 +1557,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
ret = ERROR_OUTOFMEMORY; ret = ERROR_OUTOFMEMORY;
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1580,7 +1580,7 @@ DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS pStats) ...@@ -1580,7 +1580,7 @@ DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS pStats)
TRACE("pStats %p\n", pStats); TRACE("pStats %p\n", pStats);
ret = getUDPStats(pStats); ret = getUDPStats(pStats);
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
...@@ -1610,7 +1610,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder) ...@@ -1610,7 +1610,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder)
{ {
DWORD ret; DWORD ret;
TRACE("pUdpTable %p, pdwSize %p, bOrder %ld\n", pUdpTable, pdwSize, TRACE("pUdpTable %p, pdwSize %p, bOrder %d\n", pUdpTable, pdwSize,
(DWORD)bOrder); (DWORD)bOrder);
if (!pdwSize) if (!pdwSize)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
...@@ -1647,7 +1647,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder) ...@@ -1647,7 +1647,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder)
ret = ERROR_OUTOFMEMORY; ret = ERROR_OUTOFMEMORY;
} }
} }
TRACE("returning %ld\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
......
...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
TESTDLL = iphlpapi.dll TESTDLL = iphlpapi.dll
IMPORTS = iphlpapi kernel32 IMPORTS = iphlpapi kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \ CTESTS = \
iphlpapi.c iphlpapi.c
......
...@@ -158,11 +158,11 @@ static void testGetNumberOfInterfaces(void) ...@@ -158,11 +158,11 @@ static void testGetNumberOfInterfaces(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetNumberOfInterfaces(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetNumberOfInterfaces(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetNumberOfInterfaces(&numInterfaces); apiReturn = gGetNumberOfInterfaces(&numInterfaces);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetNumberOfInterfaces returned %ld, expected 0\n", apiReturn); "GetNumberOfInterfaces returned %d, expected 0\n", apiReturn);
} }
} }
...@@ -177,17 +177,17 @@ static void testGetIfEntry(DWORD index) ...@@ -177,17 +177,17 @@ static void testGetIfEntry(DWORD index)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIfEntry(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIfEntry(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
row.dwIndex = -1; /* hope that's always bogus! */ row.dwIndex = -1; /* hope that's always bogus! */
apiReturn = gGetIfEntry(&row); apiReturn = gGetIfEntry(&row);
ok(apiReturn == ERROR_INVALID_DATA, ok(apiReturn == ERROR_INVALID_DATA,
"GetIfEntry(bogus row) returned %ld, expected ERROR_INVALID_DATA\n", "GetIfEntry(bogus row) returned %d, expected ERROR_INVALID_DATA\n",
apiReturn); apiReturn);
row.dwIndex = index; row.dwIndex = index;
apiReturn = gGetIfEntry(&row); apiReturn = gGetIfEntry(&row);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIfEntry returned %ld, expected NO_ERROR\n", apiReturn); "GetIfEntry returned %d, expected NO_ERROR\n", apiReturn);
} }
} }
...@@ -201,18 +201,18 @@ static void testGetIpAddrTable(void) ...@@ -201,18 +201,18 @@ static void testGetIpAddrTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIpAddrTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIpAddrTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIpAddrTable(NULL, &dwSize, FALSE); apiReturn = gGetIpAddrTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetIpAddrTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetIpAddrTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
PMIB_IPADDRTABLE buf = (PMIB_IPADDRTABLE)malloc(dwSize); PMIB_IPADDRTABLE buf = (PMIB_IPADDRTABLE)malloc(dwSize);
apiReturn = gGetIpAddrTable(buf, &dwSize, FALSE); apiReturn = gGetIpAddrTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIpAddrTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n", "GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
if (apiReturn == NO_ERROR && buf->dwNumEntries) if (apiReturn == NO_ERROR && buf->dwNumEntries)
testGetIfEntry(buf->table[0].dwIndex); testGetIfEntry(buf->table[0].dwIndex);
...@@ -231,18 +231,18 @@ static void testGetIfTable(void) ...@@ -231,18 +231,18 @@ static void testGetIfTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIfTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIfTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIfTable(NULL, &dwSize, FALSE); apiReturn = gGetIfTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetIfTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetIfTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
PMIB_IFTABLE buf = (PMIB_IFTABLE)malloc(dwSize); PMIB_IFTABLE buf = (PMIB_IFTABLE)malloc(dwSize);
apiReturn = gGetIfTable(buf, &dwSize, FALSE); apiReturn = gGetIfTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIfTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n\n", "GetIfTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -259,18 +259,18 @@ static void testGetIpForwardTable(void) ...@@ -259,18 +259,18 @@ static void testGetIpForwardTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIpForwardTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIpForwardTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIpForwardTable(NULL, &dwSize, FALSE); apiReturn = gGetIpForwardTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetIpForwardTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetIpForwardTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
PMIB_IPFORWARDTABLE buf = (PMIB_IPFORWARDTABLE)malloc(dwSize); PMIB_IPFORWARDTABLE buf = (PMIB_IPFORWARDTABLE)malloc(dwSize);
apiReturn = gGetIpForwardTable(buf, &dwSize, FALSE); apiReturn = gGetIpForwardTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIpForwardTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n", "GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -287,11 +287,11 @@ static void testGetIpNetTable(void) ...@@ -287,11 +287,11 @@ static void testGetIpNetTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIpNetTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIpNetTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIpNetTable(NULL, &dwSize, FALSE); apiReturn = gGetIpNetTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetIpNetTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER\n", "GetIpNetTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_NO_DATA) if (apiReturn == ERROR_NO_DATA)
; /* empty ARP table's okay */ ; /* empty ARP table's okay */
...@@ -300,7 +300,7 @@ static void testGetIpNetTable(void) ...@@ -300,7 +300,7 @@ static void testGetIpNetTable(void)
apiReturn = gGetIpNetTable(buf, &dwSize, FALSE); apiReturn = gGetIpNetTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIpNetTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n", "GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -317,11 +317,11 @@ static void testGetIcmpStatistics(void) ...@@ -317,11 +317,11 @@ static void testGetIcmpStatistics(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIcmpStatistics(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIcmpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIcmpStatistics(&stats); apiReturn = gGetIcmpStatistics(&stats);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIcmpStatistics returned %ld, expected NO_ERROR\n", apiReturn); "GetIcmpStatistics returned %d, expected NO_ERROR\n", apiReturn);
} }
} }
...@@ -335,11 +335,11 @@ static void testGetIpStatistics(void) ...@@ -335,11 +335,11 @@ static void testGetIpStatistics(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetIpStatistics(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetIpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetIpStatistics(&stats); apiReturn = gGetIpStatistics(&stats);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetIpStatistics returned %ld, expected NO_ERROR\n", apiReturn); "GetIpStatistics returned %d, expected NO_ERROR\n", apiReturn);
} }
} }
...@@ -353,11 +353,11 @@ static void testGetTcpStatistics(void) ...@@ -353,11 +353,11 @@ static void testGetTcpStatistics(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetTcpStatistics(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetTcpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetTcpStatistics(&stats); apiReturn = gGetTcpStatistics(&stats);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetTcpStatistics returned %ld, expected NO_ERROR\n", apiReturn); "GetTcpStatistics returned %d, expected NO_ERROR\n", apiReturn);
} }
} }
...@@ -371,11 +371,11 @@ static void testGetUdpStatistics(void) ...@@ -371,11 +371,11 @@ static void testGetUdpStatistics(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetUdpStatistics(NULL) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetUdpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetUdpStatistics(&stats); apiReturn = gGetUdpStatistics(&stats);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetUdpStatistics returned %ld, expected NO_ERROR\n", apiReturn); "GetUdpStatistics returned %d, expected NO_ERROR\n", apiReturn);
} }
} }
...@@ -389,18 +389,18 @@ static void testGetTcpTable(void) ...@@ -389,18 +389,18 @@ static void testGetTcpTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetTcpTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetTcpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetTcpTable(NULL, &dwSize, FALSE); apiReturn = gGetTcpTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetTcpTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
PMIB_TCPTABLE buf = (PMIB_TCPTABLE)malloc(dwSize); PMIB_TCPTABLE buf = (PMIB_TCPTABLE)malloc(dwSize);
apiReturn = gGetTcpTable(buf, &dwSize, FALSE); apiReturn = gGetTcpTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetTcpTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n", "GetTcpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -417,18 +417,18 @@ static void testGetUdpTable(void) ...@@ -417,18 +417,18 @@ static void testGetUdpTable(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetUdpTable(NULL, NULL, FALSE) returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetUdpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetUdpTable(NULL, &dwSize, FALSE); apiReturn = gGetUdpTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetUdpTable(NULL, &dwSize, FALSE) returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn != ERROR_INSUFFICIENT_BUFFER) { if (apiReturn != ERROR_INSUFFICIENT_BUFFER) {
PMIB_UDPTABLE buf = (PMIB_UDPTABLE)malloc(dwSize); PMIB_UDPTABLE buf = (PMIB_UDPTABLE)malloc(dwSize);
apiReturn = gGetUdpTable(buf, &dwSize, FALSE); apiReturn = gGetUdpTable(buf, &dwSize, FALSE);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetUdpTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n", "GetUdpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -475,18 +475,18 @@ static void testGetInterfaceInfo(void) ...@@ -475,18 +475,18 @@ static void testGetInterfaceInfo(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetInterfaceInfo returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetInterfaceInfo returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetInterfaceInfo(NULL, &len); apiReturn = gGetInterfaceInfo(NULL, &len);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetInterfaceInfo returned %ld, expected ERROR_INSUFFICIENT_BUFFER\n", "GetInterfaceInfo returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
PIP_INTERFACE_INFO buf = (PIP_INTERFACE_INFO)malloc(len); PIP_INTERFACE_INFO buf = (PIP_INTERFACE_INFO)malloc(len);
apiReturn = gGetInterfaceInfo(buf, &len); apiReturn = gGetInterfaceInfo(buf, &len);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetInterfaceInfo(buf, &dwSize) returned %ld, expected NO_ERROR\n", "GetInterfaceInfo(buf, &dwSize) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -503,11 +503,11 @@ static void testGetAdaptersInfo(void) ...@@ -503,11 +503,11 @@ static void testGetAdaptersInfo(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetAdaptersInfo returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetAdaptersInfo returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetAdaptersInfo(NULL, &len); apiReturn = gGetAdaptersInfo(NULL, &len);
ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_BUFFER_OVERFLOW, ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_BUFFER_OVERFLOW,
"GetAdaptersInfo returned %ld, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW\n", "GetAdaptersInfo returned %d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_NO_DATA) if (apiReturn == ERROR_NO_DATA)
; /* no adapter's, that's okay */ ; /* no adapter's, that's okay */
...@@ -516,7 +516,7 @@ static void testGetAdaptersInfo(void) ...@@ -516,7 +516,7 @@ static void testGetAdaptersInfo(void)
apiReturn = gGetAdaptersInfo(buf, &len); apiReturn = gGetAdaptersInfo(buf, &len);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetAdaptersInfo(buf, &dwSize) returned %ld, expected NO_ERROR\n", "GetAdaptersInfo(buf, &dwSize) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
...@@ -533,18 +533,18 @@ static void testGetNetworkParams(void) ...@@ -533,18 +533,18 @@ static void testGetNetworkParams(void)
if (apiReturn == ERROR_NOT_SUPPORTED) if (apiReturn == ERROR_NOT_SUPPORTED)
return; return;
ok(apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetNetworkParams returned %ld, expected ERROR_INVALID_PARAMETER\n", "GetNetworkParams returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn); apiReturn);
apiReturn = gGetNetworkParams(NULL, &len); apiReturn = gGetNetworkParams(NULL, &len);
ok(apiReturn == ERROR_BUFFER_OVERFLOW, ok(apiReturn == ERROR_BUFFER_OVERFLOW,
"GetNetworkParams returned %ld, expected ERROR_BUFFER_OVERFLOW\n", "GetNetworkParams returned %d, expected ERROR_BUFFER_OVERFLOW\n",
apiReturn); apiReturn);
if (apiReturn == ERROR_BUFFER_OVERFLOW) { if (apiReturn == ERROR_BUFFER_OVERFLOW) {
PFIXED_INFO buf = (PFIXED_INFO)malloc(len); PFIXED_INFO buf = (PFIXED_INFO)malloc(len);
apiReturn = gGetNetworkParams(buf, &len); apiReturn = gGetNetworkParams(buf, &len);
ok(apiReturn == NO_ERROR, ok(apiReturn == NO_ERROR,
"GetNetworkParams(buf, &dwSize) returned %ld, expected NO_ERROR\n", "GetNetworkParams(buf, &dwSize) returned %d, expected NO_ERROR\n",
apiReturn); apiReturn);
free(buf); free(buf);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment