Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How can I detect if TCPIP is installed

Title: How can I detect if TCP/IP is installed ? Question: How can I detect if TCP/IP is installed ? Answer: uses Winsock; function WinsockEnabled: boolean; var wsaData: TWSAData; begin result := true; case Winsock.WSAStartup($0101, wsaData) of WSAEINVAL, WSASYSNOTREADY, WSAVERNOTSUPPORTED: result := false; else Winsock.WSACleanup; end; end;