[IPHLPAPI] Preserve decoration in exported symbols

CORE-8462
CORE-15665
This commit is contained in:
Mark Jansen 2019-02-09 13:23:47 +01:00
parent 6cf443d6d7
commit 0bdca09a85
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 159 additions and 16 deletions

View file

@ -25,6 +25,8 @@ list(APPEND SOURCE
add_library(iphlpapi SHARED
${SOURCE}
iphlpapi.rc
iphlpapi_fakestubs.c
iphlpapi.spec
${CMAKE_CURRENT_BINARY_DIR}/iphlpapi.def)
set_module_type(iphlpapi win32dll UNICODE)

View file

@ -136,22 +136,43 @@
@ stdcall SetTcpEntry( ptr )
@ stub SetTcpEntryToStack
@ stdcall UnenableRouter( ptr ptr )
@ stub _PfAddFiltersToInterface@24
@ stub _PfAddGlobalFilterToInterface@8
@ stub _PfBindInterfaceToIPAddress@12
@ stub _PfBindInterfaceToIndex@16
@ stub _PfCreateInterface@24
@ stub _PfDeleteInterface@4
@ stub _PfDeleteLog@0
@ stub _PfGetInterfaceStatistics@16
@ stub _PfMakeLog@4
@ stub _PfRebindFilters@8
@ stub _PfRemoveFilterHandles@12
@ stub _PfRemoveFiltersFromInterface@20
@ stub _PfRemoveGlobalFilterFromInterface@8
@ stub _PfSetLogBuffer@28
@ stub _PfTestPacket@20
@ stub _PfUnBindInterface@4
# These are actually stubs, but we need to forward them to preserve the decoration.
@ stdcall -arch=i386 _PfAddFiltersToInterface@24() _PfAddFiltersToInterface@24
@ stdcall -arch=i386 _PfAddGlobalFilterToInterface@8() _PfAddGlobalFilterToInterface@8
@ stdcall -arch=i386 _PfBindInterfaceToIPAddress@12() _PfBindInterfaceToIPAddress@12
@ stdcall -arch=i386 _PfBindInterfaceToIndex@16() _PfBindInterfaceToIndex@16
@ stdcall -arch=i386 _PfCreateInterface@24() _PfCreateInterface@24
@ stdcall -arch=i386 _PfDeleteInterface@4() _PfDeleteInterface@4
@ stdcall -arch=i386 _PfDeleteLog@0() _PfDeleteLog@0
@ stdcall -arch=i386 _PfGetInterfaceStatistics@16() _PfGetInterfaceStatistics@16
@ stdcall -arch=i386 _PfMakeLog@4() _PfMakeLog@4
@ stdcall -arch=i386 _PfRebindFilters@8() _PfRebindFilters@8
@ stdcall -arch=i386 _PfRemoveFilterHandles@12() _PfRemoveFilterHandles@12
@ stdcall -arch=i386 _PfRemoveFiltersFromInterface@20() _PfRemoveFiltersFromInterface@20
@ stdcall -arch=i386 _PfRemoveGlobalFilterFromInterface@8() _PfRemoveGlobalFilterFromInterface@8
@ stdcall -arch=i386 _PfSetLogBuffer@28() _PfSetLogBuffer@28
@ stdcall -arch=i386 _PfTestPacket@20() _PfTestPacket@20
@ stdcall -arch=i386 _PfUnBindInterface@4() _PfUnBindInterface@4
# x64 does not use decoration in these names
@ stdcall -arch=x86_64 _PfAddFiltersToInterface@24()
@ stdcall -arch=x86_64 _PfAddGlobalFilterToInterface@8()
@ stdcall -arch=x86_64 _PfBindInterfaceToIPAddress@12()
@ stdcall -arch=x86_64 _PfBindInterfaceToIndex@16()
@ stdcall -arch=x86_64 _PfCreateInterface@24()
@ stdcall -arch=x86_64 _PfDeleteInterface@4()
@ stdcall -arch=x86_64 _PfDeleteLog@0()
@ stdcall -arch=x86_64 _PfGetInterfaceStatistics@16()
@ stdcall -arch=x86_64 _PfMakeLog@4()
@ stdcall -arch=x86_64 _PfRebindFilters@8()
@ stdcall -arch=x86_64 _PfRemoveFilterHandles@12()
@ stdcall -arch=x86_64 _PfRemoveFiltersFromInterface@20()
@ stdcall -arch=x86_64 _PfRemoveGlobalFilterFromInterface@8()
@ stdcall -arch=x86_64 _PfSetLogBuffer@28()
@ stdcall -arch=x86_64 _PfTestPacket@20()
@ stdcall -arch=x86_64 _PfUnBindInterface@4()
@ stub do_echo_rep
@ stub do_echo_req
@ stub register_icmp

View file

@ -0,0 +1,120 @@
#include <stubs.h>
// These are here so we can forward the decorated export functions.
// Without forwarding, we'll lose the decoration
// See:
// https://jira.reactos.org/browse/CORE-8462
// https://jira.reactos.org/browse/CORE-15665
int __stdcall PfAddFiltersToInterface(long a0, long a1, long a2, long a3, long a4, long a5)
{
DbgPrint("WARNING: calling stub PfAddFiltersToInterface(0x%lx,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3, (long)a4, (long)a5);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfAddGlobalFilterToInterface(long a0, long a1)
{
DbgPrint("WARNING: calling stub PfAddGlobalFilterToInterface(0x%lx,0x%lx)\n", (long)a0, (long)a1);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfBindInterfaceToIPAddress(long a0, long a1, long a2)
{
DbgPrint("WARNING: calling stub PfBindInterfaceToIPAddress(0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfBindInterfaceToIndex(long a0, long a1, long a2, long a3)
{
DbgPrint("WARNING: calling stub PfBindInterfaceToIndex(0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfCreateInterface(long a0, long a1, long a2, long a3, long a4, long a5)
{
DbgPrint("WARNING: calling stub PfCreateInterface(0x%lx,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3, (long)a4, (long)a5);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfDeleteInterface(long a0)
{
DbgPrint("WARNING: calling stub PfDeleteInterface(0x%lx)\n", (long)a0);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfDeleteLog()
{
DbgPrint("WARNING: calling stub PfDeleteLog()\n");
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfGetInterfaceStatistics(long a0, long a1, long a2, long a3)
{
DbgPrint("WARNING: calling stub PfGetInterfaceStatistics(0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfMakeLog(long a0)
{
DbgPrint("WARNING: calling stub PfMakeLog(0x%lx)\n", (long)a0);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfRebindFilters(long a0, long a1)
{
DbgPrint("WARNING: calling stub PfRebindFilters(0x%lx,0x%lx)\n", (long)a0, (long)a1);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfRemoveFilterHandles(long a0, long a1, long a2)
{
DbgPrint("WARNING: calling stub PfRemoveFilterHandles(0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfRemoveFiltersFromInterface(long a0, long a1, long a2, long a3, long a4)
{
DbgPrint("WARNING: calling stub PfRemoveFiltersFromInterface(0x%lx,0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3, (long)a4);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfRemoveGlobalFilterFromInterface(long a0, long a1)
{
DbgPrint("WARNING: calling stub PfRemoveGlobalFilterFromInterface(0x%lx,0x%lx)\n", (long)a0, (long)a1);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfSetLogBuffer(long a0, long a1, long a2, long a3, long a4, long a5, long a6)
{
DbgPrint("WARNING: calling stub PfSetLogBuffer(0x%lx,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3, (long)a4, (long)a5, (long)a6);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfTestPacket(long a0, long a1, long a2, long a3, long a4)
{
DbgPrint("WARNING: calling stub PfTestPacket(0x%lx,0x%lx,0x%lx,0x%lx,0x%lx)\n", (long)a0, (long)a1, (long)a2, (long)a3, (long)a4);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}
int __stdcall PfUnBindInterface(long a0)
{
DbgPrint("WARNING: calling stub PfUnBindInterface(0x%lx)\n", (long)a0);
__wine_spec_unimplemented_stub("iphlpapi.dll", __FUNCTION__);
return 0;
}