- Fixed importing forward exports by ordinal.

- Fixed export ordinals of wsock32.dll.
- Changed base addresses of mswsock.dll and wsock32.dll to match Win XP.

svn path=/trunk/; revision=6710
This commit is contained in:
Filip Navara 2003-11-19 13:16:22 +00:00
parent 2612b909f3
commit 0c998a6711
6 changed files with 114 additions and 107 deletions

View file

@ -10,6 +10,7 @@ lib/gdi32 TARGET_BASE=0x77ed0000
lib/kernel32 TARGET_BASE=0x77f00000
lib/msafd TARGET_BASE=0x777a0000
lib/msvcrt TARGET_BASE=0x78000000
lib/mswsock TARGET_BASE=0x71a30000
lib/ntdll TARGET_BASE=0x77f60000
lib/ole32 TARGET_BASE=0x77a50000
lib/oleaut32 TARGET_BASE=0x76260000
@ -20,7 +21,7 @@ lib/user32 TARGET_BASE=0x77e70000
lib/version TARGET_BASE=0x77a90000
lib/winspool TARGET_BASE=0x77800000
lib/ws2_32 TARGET_BASE=0x77780000
lib/wsock32 TARGET_BASE=0x75050000
lib/wsock32 TARGET_BASE=0x71ab0000
services/dd/vga/display TARGET_BASE=0x70000000
services/net/wshtcpip TARGET_BASE=0x777c0000
subsys/psx/lib/psxdll TARGET_BASE=0x68EB0000

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2003/09/12 17:51:47 vizzini Exp $
# $Id: Makefile,v 1.2 2003/11/19 13:16:22 navaraf Exp $
PATH_TO_TOP = ../..
@ -6,7 +6,7 @@ TARGET_TYPE = dynlink
TARGET_NAME = mswsock
TARGET_BASE = 0x75050000
TARGET_BASE = 0x71a30000
TARGET_CFLAGS = \
-I./include \

View file

@ -1,4 +1,4 @@
/* $Id: utils.c,v 1.73 2003/11/06 16:42:16 ekohl Exp $
/* $Id: utils.c,v 1.74 2003/11/19 13:16:22 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -867,14 +867,16 @@ LdrGetExportByOrdinal (
)
{
PIMAGE_EXPORT_DIRECTORY ExportDir;
ULONG ExportDirSize;
PDWORD * ExFunctions;
USHORT * ExOrdinals;
PVOID Function;
ExportDir = (PIMAGE_EXPORT_DIRECTORY)
RtlImageDirectoryEntryToData (BaseAddress,
TRUE,
IMAGE_DIRECTORY_ENTRY_EXPORT,
NULL);
&ExportDirSize);
ExOrdinals = (USHORT *)
@ -892,7 +894,17 @@ LdrGetExportByOrdinal (
Ordinal,
RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] )
);
return(RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] ));
Function = RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] );
if (((ULONG)Function >= (ULONG)ExportDir) &&
((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
}
return Function;
}

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.3 2003/09/12 17:51:48 vizzini Exp $
# $Id: Makefile,v 1.4 2003/11/19 13:16:22 navaraf Exp $
PATH_TO_TOP = ../..
@ -6,7 +6,7 @@ TARGET_TYPE = dynlink
TARGET_NAME = wsock32
TARGET_BASE = 0x75050000
TARGET_BASE = 0x71ab0000
TARGET_CFLAGS = \
-I./include \

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.5 2003/09/12 17:51:48 vizzini Exp $
/* $Id: stubs.c,v 1.6 2003/11/19 13:16:22 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock DLL
@ -9,8 +9,8 @@
*/
#include <windows.h>
#include <stdlib.h>
#include <winsock2.h>
//#include <stdlib.h>
/*
* @unimplemented
@ -28,6 +28,22 @@ getsockopt(SOCKET Sock,
return SOCKET_ERROR;
}
/*
* @unimplemented
*/
int
STDCALL
setsockopt(SOCKET Sock,
int Level,
int OptName,
const char *OptVal,
int OptLen)
{
OutputDebugStringW(L"w32sock setsockopt stub called\n");
return SOCKET_ERROR;
}
/*
* @unimplemented
*/
@ -61,24 +77,6 @@ recvfrom(SOCKET Sock,
return SOCKET_ERROR;
}
/*
* @unimplemented
*/
int
STDCALL
setsockopt(SOCKET Sock,
int Level,
int OptName,
const char *OptVal,
int OptLen)
{
OutputDebugStringW(L"w32sock setsockopt stub called\n");
return SOCKET_ERROR;
}
/*
* @unimplemented
*/

View file

@ -1,82 +1,78 @@
; $Id: wsock32.edf,v 1.3 2003/09/12 17:51:48 vizzini Exp $
;
; WSOCK32.DLL - Windows Sockets 2 DLL
LIBRARY wsock32.dll
EXPORTS
WEP=ws2_32.WEP
WSApSetPostRoutine=ws2_32.WSApSetPostRoutine
WSAAsyncGetHostByAddr=ws2_32.WSAAsyncGetHostByAddr
WSAAsyncGetHostByName=ws2_32.WSAAsyncGetHostByName
WSAAsyncGetProtoByName=ws2_32.WSAAsyncGetProtoByName
WSAAsyncGetProtoByNumber=ws2_32.WSAAsyncGetProtoByNumber
WSAAsyncGetServByName=ws2_32.WSAAsyncGetServByName
WSAAsyncGetServByPort=ws2_32.WSAAsyncGetServByPort
WSAAsyncSelect=ws2_32.WSAAsyncSelect
WSACancelAsyncRequest=ws2_32.WSACancelAsyncRequest
WSACancelBlockingCall=ws2_32.WSACancelBlockingCall
WSACleanup=ws2_32.WSACleanup
WSAGetLastError=ws2_32.WSAGetLastError
WSAIsBlocking=ws2_32.WSAIsBlocking
WSASetBlockingHook=ws2_32.WSASetBlockingHook
WSASetLastError=ws2_32.WSASetLastError
WSAStartup=ws2_32.WSAStartup
WSAUnhookBlockingHook=ws2_32.WSAUnhookBlockingHook
__WSAFDIsSet=ws2_32.__WSAFDIsSet
accept=ws2_32.accept
bind=ws2_32.bind
closesocket=ws2_32.closesocket
connect=ws2_32.connect
gethostbyaddr=ws2_32.gethostbyaddr
gethostbyname=ws2_32.gethostbyname
gethostname=ws2_32.gethostname
getpeername=ws2_32.getpeername
getprotobyname=ws2_32.getprotobyname
getprotobynumber=ws2_32.getprotobynumber
getservbyname=ws2_32.getservbyname
getservbyport=ws2_32.getservbyport
getsockname=ws2_32.getsockname
getsockopt=getsockopt@20
htonl=ws2_32.htonl
htons=ws2_32.htons
inet_addr=ws2_32.inet_addr
inet_ntoa=ws2_32.inet_ntoa
ioctlsocket=ws2_32.ioctlsocket
listen=ws2_32.listen
ntohl=ws2_32.ntohl
ntohs=ws2_32.ntohs
recv=recv@16
recvfrom=recvfrom@24
select=ws2_32.select
send=ws2_32.send
sendto=ws2_32.sendto
setsockopt=setsockopt@20
shutdown=ws2_32.shutdown
socket=ws2_32.socket
AcceptEx=mswsock.AcceptEx
EnumProtocolsA=mswsock.EnumProtocolsA
EnumProtocolsW=mswsock.EnumProtocolsW
GetAcceptExSockaddrs=mswsock.GetAcceptExSockaddrs
GetAddressByNameA=mswsock.GetAddressByNameA
GetAddressByNameW=mswsock.GetAddressByNameW
GetNameByTypeA=mswsock.GetNameByTypeA
GetNameByTypeW=mswsock.GetNameByTypeW
GetServiceA=mswsock.GetServiceA
GetServiceW=mswsock.GetServiceW
GetTypeByNameA=mswsock.GetTypeByNameA
GetTypeByNameW=mswsock.GetTypeByNameW
;MigrateWinsockConfiguration
NPLoadNameSpaces=mswsock.NPLoadNameSpaces
SetServiceA=mswsock.SetServiceA
SetServiceW=mswsock.SetServiceW
TransmitFile=mswsock.TransmitFile
WSARecvEx=mswsock.WSARecvEx
dn_expand=mswsock.dn_expand
getnetbyname=mswsock.getnetbyname
inet_network=mswsock.inet_network
rcmd=mswsock.rcmd
rexec=mswsock.rexec
rresvport=mswsock.rresvport
s_perror=mswsock.s_perror
sethostname=mswsock.sethostname
accept=ws2_32.accept @1
bind=ws2_32.bind @2
closesocket=ws2_32.closesocket @3
connect=ws2_32.connect @4
getpeername=ws2_32.getpeername @5
getsockname=ws2_32.getsockname @6
getsockopt=getsockopt@20 @ 7
htonl=ws2_32.htonl @8
htons=ws2_32.htons @9
inet_addr=ws2_32.inet_addr @10
inet_ntoa=ws2_32.inet_ntoa @11
ioctlsocket=ws2_32.ioctlsocket @12
listen=ws2_32.listen @13
ntohl=ws2_32.ntohl @14
ntohs=ws2_32.ntohs @15
recv=recv@16 @16
recvfrom=recvfrom@24 @17
select=ws2_32.select @18
send=ws2_32.send @19
sendto=ws2_32.sendto @20
setsockopt=setsockopt@20 @21
shutdown=ws2_32.shutdown @22
socket=ws2_32.socket @23
MigrateWinsockConfiguration=MSWSOCK.MigrateWinsockConfiguration @24
gethostbyaddr=ws2_32.gethostbyaddr @51
gethostbyname=ws2_32.gethostbyname @52
getprotobyname=ws2_32.getprotobyname @53
getprotobynumber=ws2_32.getprotobynumber @54
getservbyname=ws2_32.getservbyname @55
getservbyport=ws2_32.getservbyport @56
gethostname=ws2_32.gethostname @57
WSAAsyncSelect=ws2_32.WSAAsyncSelect @101
WSAAsyncGetHostByAddr=ws2_32.WSAAsyncGetHostByAddr @102
WSAAsyncGetHostByName=ws2_32.WSAAsyncGetHostByName @103
WSAAsyncGetProtoByNumber=ws2_32.WSAAsyncGetProtoByNumber @104
WSAAsyncGetProtoByName=ws2_32.WSAAsyncGetProtoByName @105
WSAAsyncGetServByPort=ws2_32.WSAAsyncGetServByPort @106
WSAAsyncGetServByName=ws2_32.WSAAsyncGetServByName @107
WSACancelAsyncRequest=ws2_32.WSACancelAsyncRequest @108
WSASetBlockingHook=ws2_32.WSASetBlockingHook @109
WSAUnhookBlockingHook=ws2_32.WSAUnhookBlockingHook @110
WSAGetLastError=ws2_32.WSAGetLastError @111
WSASetLastError=ws2_32.WSASetLastError @112
WSACancelBlockingCall=ws2_32.WSACancelBlockingCall @113
WSAIsBlocking=ws2_32.WSAIsBlocking @114
WSAStartup=ws2_32.WSAStartup @115
WSACleanup=ws2_32.WSACleanup @116
__WSAFDIsSet=ws2_32.__WSAFDIsSet @151
WEP=ws2_32.WEP @500
WSApSetPostRoutine=ws2_32.WSApSetPostRoutine @1000
inet_network=MSWSOCK.inet_network @1100
getnetbyname=MSWSOCK.getnetbyname @1101
rcmd=MSWSOCK.rcmd @1102
rexec=MSWSOCK.rexec @1103
rresvport=MSWSOCK.rresvport @1104
sethostname=MSWSOCK.sethostname @1105
dn_expand=MSWSOCK.dn_expand @1106
WSARecvEx=MSWSOCK.WSARecvEx @1107
s_perror=MSWSOCK.s_perror @1108
GetAddressByNameA=MSWSOCK.GetAddressByNameA @1109
GetAddressByNameW=MSWSOCK.GetAddressByNameW @1110
EnumProtocolsA=MSWSOCK.EnumProtocolsA @1111
EnumProtocolsW=MSWSOCK.EnumProtocolsW @1112
GetTypeByNameA=MSWSOCK.GetTypeByNameA @1113
GetTypeByNameW=MSWSOCK.GetTypeByNameW @1114
GetNameByTypeA=MSWSOCK.GetNameByTypeA @1115
GetNameByTypeW=MSWSOCK.GetNameByTypeW @1116
SetServiceA=MSWSOCK.SetServiceA @1117
SetServiceW=MSWSOCK.SetServiceW @1118
GetServiceA=MSWSOCK.GetServiceA @1119
GetServiceW=MSWSOCK.GetServiceW @1120
NPLoadNameSpaces=MSWSOCK.NPLoadNameSpaces @1130
TransmitFile=MSWSOCK.TransmitFile @1140
AcceptEx=MSWSOCK.AcceptEx @1141
GetAcceptExSockaddrs=MSWSOCK.GetAcceptExSockaddrs @1142