Skip to content

Commit fe497a2

Browse files
authored
[IPHLPAPI_WINETEST][IPHLPAPI] Sync iphlpapi_winetest to wine-10.0 (reactos#8309)
- [IPHLPAPI_WINETEST] Sync to wine-10.0 - [IPHLPAPI] Add stubs for Vista+ functions so these functions can link properly when DLL_EXPORT_VERSION >= 0x600
1 parent 70406e0 commit fe497a2

File tree

3 files changed

+2668
-1114
lines changed

3 files changed

+2668
-1114
lines changed

dll/win32/iphlpapi/iphlpapi.spec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
@ stdcall AllocateAndGetUdpTableFromStack(ptr long long long)
1313
@ stdcall CancelIPChangeNotify(ptr)
1414
@ stub CancelSecurityHealthChangeNotify
15+
@ stdcall -stub -version=0x600+ ConvertGuidToStringA(ptr ptr long)
16+
@ stdcall -stub -version=0x600+ ConvertGuidToStringW(ptr ptr long)
17+
@ stdcall -stub -version=0x600+ ConvertInterfaceAliasToLuid(wstr ptr)
18+
@ stdcall -stub -version=0x600+ ConvertInterfaceGuidToLuid(ptr ptr)
19+
@ stdcall -stub -version=0x600+ ConvertInterfaceIndexToLuid(long ptr)
20+
@ stdcall -stub -version=0x600+ ConvertInterfaceLuidToAlias(ptr ptr long)
21+
@ stdcall -stub -version=0x600+ ConvertInterfaceLuidToGuid(ptr ptr)
22+
@ stdcall -stub -version=0x600+ ConvertInterfaceLuidToIndex(ptr ptr)
23+
@ stdcall -stub -version=0x600+ ConvertInterfaceLuidToNameA(ptr ptr long)
24+
@ stdcall -stub -version=0x600+ ConvertInterfaceLuidToNameW(ptr ptr long)
25+
@ stdcall -stub -version=0x600+ ConvertInterfaceNameToLuidA(str ptr)
26+
@ stdcall -stub -version=0x600+ ConvertInterfaceNameToLuidW(wstr ptr)
27+
@ stdcall -stub -version=0x600+ ConvertLengthToIpv4Mask(long ptr)
28+
@ stdcall -stub -version=0x600+ ConvertStringToGuidW(wstr ptr)
1529
@ stdcall CreateIpForwardEntry(ptr)
1630
@ stdcall CreateIpNetEntry(ptr)
1731
@ stdcall CreateProxyArpEntry(long long long)
@@ -23,6 +37,7 @@
2337
@ stdcall EnableRouter(ptr ptr)
2438
@ stdcall FlushIpNetTable(long)
2539
@ stub FlushIpNetTableFromStack
40+
@ stdcall -stub -version=0x600+ FreeMibTable(ptr)
2641
@ stdcall GetAdapterIndex(wstr ptr)
2742
@ stdcall GetAdapterOrderMap()
2843
@ stdcall GetAdaptersAddresses(long long ptr ptr ptr)
@@ -32,6 +47,7 @@
3247
@ stub GetBestInterfaceFromStack
3348
@ stdcall GetBestRoute(long long long)
3449
@ stub GetBestRouteFromStack
50+
@ stdcall -stub -version=0x600+ GetCurrentThreadCompartmentId()
3551
@ stdcall GetExtendedTcpTable(ptr ptr long long long long)
3652
@ stdcall GetExtendedUdpTable(ptr ptr long long long long)
3753
@ stdcall GetFriendlyIfIndex(long)
@@ -40,17 +56,23 @@
4056
@ stub GetIcmpStatsFromStack
4157
@ stub GetIcmpStatsFromStackEx
4258
@ stdcall GetIfEntry(ptr)
59+
@ stdcall -stub -version=0x600+ GetIfEntry2(ptr)
60+
@ stdcall -stub -version=0xA00+ GetIfEntry2Ex(long ptr)
4361
@ stub GetIfEntryFromStack
4462
@ stdcall GetIfTable(ptr ptr long)
63+
@ stdcall -stub -version=0x600+ GetIfTable2(ptr)
64+
@ stdcall -stub -version=0x600+ GetIfTable2Ex(long ptr)
4565
@ stub GetIfTableFromStack
4666
@ stub GetIgmpList
4767
@ stdcall GetInterfaceInfo(ptr ptr)
4868
@ stdcall GetIpAddrTable(ptr ptr long)
4969
@ stub GetIpAddrTableFromStack
5070
@ stdcall GetIpErrorString(long ptr ptr)
5171
@ stdcall GetIpForwardTable(ptr ptr long)
72+
@ stdcall -stub -version=0x600+ GetIpForwardTable2(long ptr)
5273
@ stub GetIpForwardTableFromStack
5374
@ stdcall GetIpNetTable(ptr ptr long)
75+
@ stdcall -stub -version=0x600+ GetIpNetTable2(long ptr)
5476
@ stub GetIpNetTableFromStack
5577
@ stdcall GetIpStatistics(ptr)
5678
@ stdcall GetIpStatisticsEx(ptr long)
@@ -78,6 +100,8 @@
78100
@ stub GetUdpStatsFromStackEx
79101
@ stdcall GetUdpTable(ptr ptr long)
80102
@ stub GetUdpTableFromStack
103+
@ stdcall -stub -version=0x600+ GetUnicastIpAddressEntry(ptr)
104+
@ stdcall -stub -version=0x600+ GetUnicastIpAddressTable(long ptr)
81105
@ stdcall GetUniDirectionalAdapterInfo(ptr ptr)
82106
@ stdcall Icmp6CreateFile()
83107
@ stdcall Icmp6ParseReplies(ptr long)
@@ -87,6 +111,8 @@
87111
@ stdcall IcmpParseReplies(ptr long)
88112
@ stdcall IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long)
89113
@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long)
114+
@ stdcall -stub -version=0x600+ if_indextoname(long ptr)
115+
@ stdcall -stub -version=0x600+ if_nametoindex(str)
90116
@ stub InternalCreateIpForwardEntry
91117
@ stub InternalCreateIpNetEntry
92118
@ stub InternalDeleteIpForwardEntry
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11

2-
add_definitions(-D__ROS_LONG64__)
2+
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/wine)
33

44
add_executable(iphlpapi_winetest iphlpapi.c testlist.c)
55
target_link_libraries(iphlpapi_winetest wine)
66
set_module_type(iphlpapi_winetest win32cui)
7-
add_importlibs(iphlpapi_winetest ws2_32 msvcrt kernel32 ntdll)
7+
add_importlibs(iphlpapi_winetest iphlpapi ws2_32 msvcrt kernel32 ntdll)
88
add_rostests_file(TARGET iphlpapi_winetest)
9+
10+
if(MSVC)
11+
target_compile_options(iphlpapi_winetest PRIVATE
12+
/wd4024
13+
/wd4047
14+
/wd4133
15+
/wd4477)
16+
endif()
17+
18+
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
19+
CMAKE_C_COMPILER_ID STREQUAL "Clang")
20+
target_compile_options(iphlpapi_winetest PRIVATE
21+
-Wno-format
22+
-Wno-int-conversion
23+
-Wno-incompatible-pointer-types)
24+
endif()
25+
26+
target_compile_definitions(iphlpapi_winetest PRIVATE
27+
WINETEST_USE_DBGSTR_LONGLONG
28+
__WINE_WINSOCKAPI_STDLIB_H
29+
strcasecmp=_stricmp)
30+

0 commit comments

Comments
 (0)