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

View File

@ -32,15 +32,15 @@ Type
pu_int = ^u_int; pu_int = ^u_int;
pu_long = ^u_long; 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; WSAEVENT = THandle;
PWSAEVENT = ^WSAEVENT; PWSAEVENT = ^WSAEVENT;
LPWSAEVENT = PWSAEVENT; LPWSAEVENT = PWSAEVENT;
{$IFDEF UNICODE} {$IFDEF UNICODE}
PMBChar = PWideChar; PMBChar = PWideChar;
{$ELSE} {$ELSE}
PMBChar = PChar; PMBChar = PChar;
{$ENDIF} {$ENDIF}
const const
@ -596,21 +596,29 @@ const
WSADESCRIPTION_LEN = 256; WSADESCRIPTION_LEN = 256;
WSASYS_STATUS_LEN = 128; WSASYS_STATUS_LEN = 128;
MAX_PROTOCOL_CHAIN = 7; MAX_PROTOCOL_CHAIN = 7;
BASE_PROTOCOL = 1; BASE_PROTOCOL = 1;
LAYERED_PROTOCOL = 0; LAYERED_PROTOCOL = 0;
WSAPROTOCOL_LEN = 255; WSAPROTOCOL_LEN = 255;
type type
PWSAData = ^TWSAData; PWSAData = ^TWSAData;
TWSAData = packed record TWSAData = record
wVersion: Word; wVersion : WORD; { 2 byte, ofs 0 }
wHighVersion: Word; wHighVersion : WORD; { 2 byte, ofs 2 }
szDescription: array[0..WSADESCRIPTION_LEN] of Char; {$ifdef win64}
szSystemStatus: array[0..WSASYS_STATUS_LEN] of Char; iMaxSockets : word;
iMaxSockets: Word; iMaxUdpDg : word;
iMaxUdpDg: Word; lpVendorInfo : pchar;
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; end;
{ WSAOVERLAPPED = Record { WSAOVERLAPPED = Record