- 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/kernel32 TARGET_BASE=0x77f00000
lib/msafd TARGET_BASE=0x777a0000 lib/msafd TARGET_BASE=0x777a0000
lib/msvcrt TARGET_BASE=0x78000000 lib/msvcrt TARGET_BASE=0x78000000
lib/mswsock TARGET_BASE=0x71a30000
lib/ntdll TARGET_BASE=0x77f60000 lib/ntdll TARGET_BASE=0x77f60000
lib/ole32 TARGET_BASE=0x77a50000 lib/ole32 TARGET_BASE=0x77a50000
lib/oleaut32 TARGET_BASE=0x76260000 lib/oleaut32 TARGET_BASE=0x76260000
@ -20,7 +21,7 @@ lib/user32 TARGET_BASE=0x77e70000
lib/version TARGET_BASE=0x77a90000 lib/version TARGET_BASE=0x77a90000
lib/winspool TARGET_BASE=0x77800000 lib/winspool TARGET_BASE=0x77800000
lib/ws2_32 TARGET_BASE=0x77780000 lib/ws2_32 TARGET_BASE=0x77780000
lib/wsock32 TARGET_BASE=0x75050000 lib/wsock32 TARGET_BASE=0x71ab0000
services/dd/vga/display TARGET_BASE=0x70000000 services/dd/vga/display TARGET_BASE=0x70000000
services/net/wshtcpip TARGET_BASE=0x777c0000 services/net/wshtcpip TARGET_BASE=0x777c0000
subsys/psx/lib/psxdll TARGET_BASE=0x68EB0000 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 = ../.. PATH_TO_TOP = ../..
@ -6,7 +6,7 @@ TARGET_TYPE = dynlink
TARGET_NAME = mswsock TARGET_NAME = mswsock
TARGET_BASE = 0x75050000 TARGET_BASE = 0x71a30000
TARGET_CFLAGS = \ TARGET_CFLAGS = \
-I./include \ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -867,14 +867,16 @@ LdrGetExportByOrdinal (
) )
{ {
PIMAGE_EXPORT_DIRECTORY ExportDir; PIMAGE_EXPORT_DIRECTORY ExportDir;
ULONG ExportDirSize;
PDWORD * ExFunctions; PDWORD * ExFunctions;
USHORT * ExOrdinals; USHORT * ExOrdinals;
PVOID Function;
ExportDir = (PIMAGE_EXPORT_DIRECTORY) ExportDir = (PIMAGE_EXPORT_DIRECTORY)
RtlImageDirectoryEntryToData (BaseAddress, RtlImageDirectoryEntryToData (BaseAddress,
TRUE, TRUE,
IMAGE_DIRECTORY_ENTRY_EXPORT, IMAGE_DIRECTORY_ENTRY_EXPORT,
NULL); &ExportDirSize);
ExOrdinals = (USHORT *) ExOrdinals = (USHORT *)
@ -892,7 +894,17 @@ LdrGetExportByOrdinal (
Ordinal, Ordinal,
RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] ) 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 = ../.. PATH_TO_TOP = ../..
@ -6,7 +6,7 @@ TARGET_TYPE = dynlink
TARGET_NAME = wsock32 TARGET_NAME = wsock32
TARGET_BASE = 0x75050000 TARGET_BASE = 0x71ab0000
TARGET_CFLAGS = \ TARGET_CFLAGS = \
-I./include \ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock DLL * PROJECT: ReactOS WinSock DLL
@ -9,8 +9,8 @@
*/ */
#include <windows.h> #include <windows.h>
#include <stdlib.h>
#include <winsock2.h> #include <winsock2.h>
//#include <stdlib.h>
/* /*
* @unimplemented * @unimplemented
@ -28,6 +28,22 @@ getsockopt(SOCKET Sock,
return SOCKET_ERROR; 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 * @unimplemented
*/ */
@ -61,24 +77,6 @@ recvfrom(SOCKET Sock,
return SOCKET_ERROR; 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 * @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 LIBRARY wsock32.dll
EXPORTS EXPORTS
WEP=ws2_32.WEP accept=ws2_32.accept @1
WSApSetPostRoutine=ws2_32.WSApSetPostRoutine bind=ws2_32.bind @2
WSAAsyncGetHostByAddr=ws2_32.WSAAsyncGetHostByAddr closesocket=ws2_32.closesocket @3
WSAAsyncGetHostByName=ws2_32.WSAAsyncGetHostByName connect=ws2_32.connect @4
WSAAsyncGetProtoByName=ws2_32.WSAAsyncGetProtoByName getpeername=ws2_32.getpeername @5
WSAAsyncGetProtoByNumber=ws2_32.WSAAsyncGetProtoByNumber getsockname=ws2_32.getsockname @6
WSAAsyncGetServByName=ws2_32.WSAAsyncGetServByName getsockopt=getsockopt@20 @ 7
WSAAsyncGetServByPort=ws2_32.WSAAsyncGetServByPort htonl=ws2_32.htonl @8
WSAAsyncSelect=ws2_32.WSAAsyncSelect htons=ws2_32.htons @9
WSACancelAsyncRequest=ws2_32.WSACancelAsyncRequest inet_addr=ws2_32.inet_addr @10
WSACancelBlockingCall=ws2_32.WSACancelBlockingCall inet_ntoa=ws2_32.inet_ntoa @11
WSACleanup=ws2_32.WSACleanup ioctlsocket=ws2_32.ioctlsocket @12
WSAGetLastError=ws2_32.WSAGetLastError listen=ws2_32.listen @13
WSAIsBlocking=ws2_32.WSAIsBlocking ntohl=ws2_32.ntohl @14
WSASetBlockingHook=ws2_32.WSASetBlockingHook ntohs=ws2_32.ntohs @15
WSASetLastError=ws2_32.WSASetLastError recv=recv@16 @16
WSAStartup=ws2_32.WSAStartup recvfrom=recvfrom@24 @17
WSAUnhookBlockingHook=ws2_32.WSAUnhookBlockingHook select=ws2_32.select @18
__WSAFDIsSet=ws2_32.__WSAFDIsSet send=ws2_32.send @19
accept=ws2_32.accept sendto=ws2_32.sendto @20
bind=ws2_32.bind setsockopt=setsockopt@20 @21
closesocket=ws2_32.closesocket shutdown=ws2_32.shutdown @22
connect=ws2_32.connect socket=ws2_32.socket @23
gethostbyaddr=ws2_32.gethostbyaddr MigrateWinsockConfiguration=MSWSOCK.MigrateWinsockConfiguration @24
gethostbyname=ws2_32.gethostbyname gethostbyaddr=ws2_32.gethostbyaddr @51
gethostname=ws2_32.gethostname gethostbyname=ws2_32.gethostbyname @52
getpeername=ws2_32.getpeername getprotobyname=ws2_32.getprotobyname @53
getprotobyname=ws2_32.getprotobyname getprotobynumber=ws2_32.getprotobynumber @54
getprotobynumber=ws2_32.getprotobynumber getservbyname=ws2_32.getservbyname @55
getservbyname=ws2_32.getservbyname getservbyport=ws2_32.getservbyport @56
getservbyport=ws2_32.getservbyport gethostname=ws2_32.gethostname @57
getsockname=ws2_32.getsockname WSAAsyncSelect=ws2_32.WSAAsyncSelect @101
getsockopt=getsockopt@20 WSAAsyncGetHostByAddr=ws2_32.WSAAsyncGetHostByAddr @102
htonl=ws2_32.htonl WSAAsyncGetHostByName=ws2_32.WSAAsyncGetHostByName @103
htons=ws2_32.htons WSAAsyncGetProtoByNumber=ws2_32.WSAAsyncGetProtoByNumber @104
inet_addr=ws2_32.inet_addr WSAAsyncGetProtoByName=ws2_32.WSAAsyncGetProtoByName @105
inet_ntoa=ws2_32.inet_ntoa WSAAsyncGetServByPort=ws2_32.WSAAsyncGetServByPort @106
ioctlsocket=ws2_32.ioctlsocket WSAAsyncGetServByName=ws2_32.WSAAsyncGetServByName @107
listen=ws2_32.listen WSACancelAsyncRequest=ws2_32.WSACancelAsyncRequest @108
ntohl=ws2_32.ntohl WSASetBlockingHook=ws2_32.WSASetBlockingHook @109
ntohs=ws2_32.ntohs WSAUnhookBlockingHook=ws2_32.WSAUnhookBlockingHook @110
recv=recv@16 WSAGetLastError=ws2_32.WSAGetLastError @111
recvfrom=recvfrom@24 WSASetLastError=ws2_32.WSASetLastError @112
select=ws2_32.select WSACancelBlockingCall=ws2_32.WSACancelBlockingCall @113
send=ws2_32.send WSAIsBlocking=ws2_32.WSAIsBlocking @114
sendto=ws2_32.sendto WSAStartup=ws2_32.WSAStartup @115
setsockopt=setsockopt@20 WSACleanup=ws2_32.WSACleanup @116
shutdown=ws2_32.shutdown __WSAFDIsSet=ws2_32.__WSAFDIsSet @151
socket=ws2_32.socket WEP=ws2_32.WEP @500
AcceptEx=mswsock.AcceptEx WSApSetPostRoutine=ws2_32.WSApSetPostRoutine @1000
EnumProtocolsA=mswsock.EnumProtocolsA inet_network=MSWSOCK.inet_network @1100
EnumProtocolsW=mswsock.EnumProtocolsW getnetbyname=MSWSOCK.getnetbyname @1101
GetAcceptExSockaddrs=mswsock.GetAcceptExSockaddrs rcmd=MSWSOCK.rcmd @1102
GetAddressByNameA=mswsock.GetAddressByNameA rexec=MSWSOCK.rexec @1103
GetAddressByNameW=mswsock.GetAddressByNameW rresvport=MSWSOCK.rresvport @1104
GetNameByTypeA=mswsock.GetNameByTypeA sethostname=MSWSOCK.sethostname @1105
GetNameByTypeW=mswsock.GetNameByTypeW dn_expand=MSWSOCK.dn_expand @1106
GetServiceA=mswsock.GetServiceA WSARecvEx=MSWSOCK.WSARecvEx @1107
GetServiceW=mswsock.GetServiceW s_perror=MSWSOCK.s_perror @1108
GetTypeByNameA=mswsock.GetTypeByNameA GetAddressByNameA=MSWSOCK.GetAddressByNameA @1109
GetTypeByNameW=mswsock.GetTypeByNameW GetAddressByNameW=MSWSOCK.GetAddressByNameW @1110
;MigrateWinsockConfiguration EnumProtocolsA=MSWSOCK.EnumProtocolsA @1111
NPLoadNameSpaces=mswsock.NPLoadNameSpaces EnumProtocolsW=MSWSOCK.EnumProtocolsW @1112
SetServiceA=mswsock.SetServiceA GetTypeByNameA=MSWSOCK.GetTypeByNameA @1113
SetServiceW=mswsock.SetServiceW GetTypeByNameW=MSWSOCK.GetTypeByNameW @1114
TransmitFile=mswsock.TransmitFile GetNameByTypeA=MSWSOCK.GetNameByTypeA @1115
WSARecvEx=mswsock.WSARecvEx GetNameByTypeW=MSWSOCK.GetNameByTypeW @1116
dn_expand=mswsock.dn_expand SetServiceA=MSWSOCK.SetServiceA @1117
getnetbyname=mswsock.getnetbyname SetServiceW=MSWSOCK.SetServiceW @1118
inet_network=mswsock.inet_network GetServiceA=MSWSOCK.GetServiceA @1119
rcmd=mswsock.rcmd GetServiceW=MSWSOCK.GetServiceW @1120
rexec=mswsock.rexec NPLoadNameSpaces=MSWSOCK.NPLoadNameSpaces @1130
rresvport=mswsock.rresvport TransmitFile=MSWSOCK.TransmitFile @1140
s_perror=mswsock.s_perror AcceptEx=MSWSOCK.AcceptEx @1141
sethostname=mswsock.sethostname GetAcceptExSockaddrs=MSWSOCK.GetAcceptExSockaddrs @1142