此处使winsock.pas 中的一例,你可以参考,其中传递了两个结构PFDSet和PTimeVal.
const winsocket = 'wsock32.dll';
type
PFDSet = ^TFDSet;
TFDSet = record
fd_count: u_int;
fd_array: array[0..FD_SETSIZE-1] of TSocket;
end;
PTimeVal = ^TTimeVal;
timeval = record
tv_sec: Longint;
tv_usec: Longint;
end;
TTimeVal = timeval;
function select;
external winsocket name 'select';//接口部分
implementation
function select(nfds: Integer;
readfds, writefds, exceptfds: PFDSet;
timeout: PTimeVal): Longint;
stdcall;
//参数部分