if(hConnect==NULL)
{
MessageBox("连接失败");
}
else
Messagebox("连接成功");
……
[/Quote]
--MSDN
For FTP sites, InternetConnect actually establishes a connection with the server; for others, such as Gopher, the actual connection is not established until the application requests a specific transaction.