Thema: Delphi umysqlvio typumwandlung

Einzelnen Beitrag anzeigen

SparrowSX

Registriert seit: 31. Mai 2008
Ort: Wilhelmshaven
7 Beiträge
 
RAD-Studio 2009 Arc
 
#3

Re: umysqlvio typumwandlung

  Alt 13. Nov 2009, 10:52
Delphi-Quellcode:
          {$IFNDEF _WIN_}
          ffcntl_mode := fcntl(fsd, F_GETFL);
          {$ENDIF}
          {$IFDEF _WIN_}
          vio_blocking(false);
          {$ENDIF}
          //try to resolve the host <- Zeile 964
          fillchar(sock_addr,sizeof(sock_addr),#0);
          sock_addr.sin_family := AF_INET;
          ip_addr := {$IFOPT R+}cardinal{$ENDIF}(inet_addr(pchar(host))); // thanks Jiri Barton
          if (ip_addr <> INADDR_NONE) then
            sock_addr.sin_addr:=in_addr(ip_addr)
          else
            begin
              hp:=gethostbyname(pchar(host));
              if (hp=nil) then
                begin
                   flast_errno:=CR_UNKNOWN_HOST;
                  {$IFDEF _WIN_}
                  flast_error:=format(client_errors[(flast_errno)-CR_MIN_ERROR],[host, WSAGetLastError]);
                  {$ELSE}
                  flast_error:=format(client_errors[(flast_errno)-CR_MIN_ERROR],[host, errno]);
                  {$ENDIF}                                                                          <- Zeile 980
                   result:=-7; //we can't connect
                        closesocket(sock);
                     exit;
                end;
Christian
  Mit Zitat antworten Zitat