var
   client: tsocket;
   pmycontext: pContextKey;
   hex: integer;
   n: Cardinal;
   name: sockaddr_in;
   res: longbool;
   ret: cardinal;
   outBuffer: pchar;
begin
   client:=socket(AF_INET,SOCK_STREAM,0);   name.sin_family := PF_INET;   name.sin_addr.s_addr := inet_addr(PChar('10.183.46.26'));   name.sin_port := htons(55962);
   
   connect(client,name,sizeof(name));   GetMem(pmycontext,sizeof(context));
   pmycontext^.mysock:=client;
   pmycontext^.ovOut.hEvent:= CreateEvent(nil,false,false,nil);
   inttohex(1,hex);
   pmycontext^.ovOut.hEvent:= (context.ovOut.hEvent or hex);
   ret:=CreateIoCompletionPort((pmycontext^.mysock),ghCompletionPort,0,0);//第三個參數應該傳什么
   if ret=0 then
   begin
      showmessage( SysErrorMessage(GetLastError));
   end;   GetMem(outBuffer,40*sizeof(char));
   res:=writefileex( client,outBuffer,4,pmycontext^.ovOut,nil);//出問題了﹐'參數錯誤'
   if res=false then
   begin
      showmessage(SysErrorMessage(GetLastError));
   end;