InetDisconnect Example for C++ 5.0 and later

void CNet::Method()
{
   int nRet;
   CString cs;
   /* We are assuming only one connection in this example.
   Therefore, the handle to the remote computer will be
   in the first position in the SendList.
   */
   nRet = m_pRasterInet->   InetDisconnect(m_pRasterInet->SendList(0));
   if (nRet != 0)
   {
      cs.Format(TEXT("%s %d\n"), TEXT("Error disconnecting from the server:"),nRet);
      AfxMessageBox(cs);
   }
}