* fixed several win64 stuff

git-svn-id: trunk@4601 -
This commit is contained in:
florian 2006-09-10 15:14:23 +00:00
parent c261068ab5
commit bca9b6c132
2 changed files with 38 additions and 23 deletions

View File

@ -53,7 +53,7 @@ unit winsock;
u_long = dword;
pu_long = ^u_long;
plongint = ^longint;
TSocket = u_long;
TSocket = UINT_PTR;
{ there is already a procedure called FD_SET, so this
record was renamed (FK) }
@ -274,13 +274,20 @@ unit winsock;
WSADATA = record
wVersion : WORD; { 2 byte, ofs 0 }
wHighVersion : WORD; { 2 byte, ofs 2 }
szDescription : array[0..(WSADESCRIPTION_LEN+1)-1] of char; { 257 byte, ofs 4 }
szSystemStatus : array[0..(WSASYS_STATUS_LEN+1)-1] of char; { 129 byte, ofs 261 }
{$ifdef win64}
iMaxSockets : word; { 2 byte, ofs 390 }
iMaxUdpDg : word; { 2 byte, ofs 392 }
pad1 : SmallInt; { 2 byte, ofs 394 } { ensure right packaging }
lpVendorInfo : pchar; { 4 byte, ofs 396 }
end; { total size 400 }
szDescription : array[0..WSADESCRIPTION_LEN] of char; { 257 byte, ofs 4 }
szSystemStatus : array[0..WSASYS_STATUS_LEN] of char; { 129 byte, ofs 261 }
{$else win64}
szDescription : array[0..WSADESCRIPTION_LEN] of char; { 257 byte, ofs 4 }
szSystemStatus : array[0..WSASYS_STATUS_LEN] of char; { 129 byte, ofs 261 }
iMaxSockets : word; { 2 byte, ofs 390 }
iMaxUdpDg : word; { 2 byte, ofs 392 }
lpVendorInfo : pchar; { 4 byte, ofs 396 }
{$endif win64}
end;
TWSAData = WSADATA;
PWSAData = TWSAData;

View File

@ -32,15 +32,15 @@ Type
pu_int = ^u_int;
pu_long = ^u_long;
TSocket = u_int; { The new type to be used in all instances which refer to sockets. }
TSocket = UINT_PTR; { The new type to be used in all instances which refer to sockets. }
WSAEVENT = THandle;
PWSAEVENT = ^WSAEVENT;
LPWSAEVENT = PWSAEVENT;
WSAEVENT = THandle;
PWSAEVENT = ^WSAEVENT;
LPWSAEVENT = PWSAEVENT;
{$IFDEF UNICODE}
PMBChar = PWideChar;
PMBChar = PWideChar;
{$ELSE}
PMBChar = PChar;
PMBChar = PChar;
{$ENDIF}
const
@ -596,21 +596,29 @@ const
WSADESCRIPTION_LEN = 256;
WSASYS_STATUS_LEN = 128;
MAX_PROTOCOL_CHAIN = 7;
BASE_PROTOCOL = 1;
LAYERED_PROTOCOL = 0;
WSAPROTOCOL_LEN = 255;
MAX_PROTOCOL_CHAIN = 7;
BASE_PROTOCOL = 1;
LAYERED_PROTOCOL = 0;
WSAPROTOCOL_LEN = 255;
type
PWSAData = ^TWSAData;
TWSAData = packed record
wVersion: Word;
wHighVersion: Word;
szDescription: array[0..WSADESCRIPTION_LEN] of Char;
szSystemStatus: array[0..WSASYS_STATUS_LEN] of Char;
iMaxSockets: Word;
iMaxUdpDg: Word;
lpVendorInfo: PChar;
TWSAData = record
wVersion : WORD; { 2 byte, ofs 0 }
wHighVersion : WORD; { 2 byte, ofs 2 }
{$ifdef win64}
iMaxSockets : word;
iMaxUdpDg : word;
lpVendorInfo : pchar;
szDescription : array[0..WSADESCRIPTION_LEN] of char;
szSystemStatus : array[0..WSASYS_STATUS_LEN] of char;
{$else win64}
szDescription : array[0..WSADESCRIPTION_LEN] of char; { 257 byte, ofs 4 }
szSystemStatus : array[0..WSASYS_STATUS_LEN] of char; { 129 byte, ofs 261 }
iMaxSockets : word; { 2 byte, ofs 390 }
iMaxUdpDg : word; { 2 byte, ofs 392 }
lpVendorInfo : pchar; { 4 byte, ofs 396 }
{$endif win64}
end;
{ WSAOVERLAPPED = Record