DWORD dwSavedState = gdwDownloadDialogStatus;
void CloseSocket(char *szProxyServer, char *szProxyPort){  DWORD dwSavedState = gdwDownloadDialogStatus;//  /* gdwDownloadDialogStatus needs to be not set before calling//   * CloseSocket(), or else the socket will not be properly closed *///  gdwDownloadDialogStatus = CS_NONE;  /* Close the socket connection from the first attempt. */  if((szProxyServer != NULL) && (szProxyPort != NULL) &&     (*szProxyServer != '\0') && (*szProxyPort != '\0'))      DownloadViaProxyClose();  else  {    /* is this an HTTP URL? */    if(strncmp(gszUrl, kHTTP, lstrlen(kHTTP)) == 0)      DownloadViaHTTPClose();    /* or is this an FTP URL? */    else if(strncmp(gszUrl, kFTP, lstrlen(kFTP)) == 0)      DownloadViaFTPClose();  }//  gdwDownloadDialogStatus = dwSavedState;}