gbStartTickCounter = TRUE;
int DownloadViaFTP(char *szUrl){  char *host = 0, *path = 0, *file = (char*) kLoclFile;  int port = 21;  int rv;  if((!szUrl) || (*szUrl == '\0'))    return nsFTPConn::E_PARAM;  if(connFTP == NULL)  {    rv = DownloadViaFTPOpen(szUrl);    if(rv != nsFTPConn::OK)    {      DownloadViaFTPClose();      return(rv);    }  }  if(connFTP == NULL)  {    char szBuf[MAX_BUF_TINY];    GetPrivateProfileString("Strings", "Error Out Of Memory", "", szBuf, sizeof(szBuf), szFileIniConfig);    PrintError(szBuf, ERROR_CODE_HIDE);    return(WIZ_OUT_OF_MEMORY);  }  rv = nsHTTPConn::ParseURL(kFTP, szUrl, &host, &port, &path);  if(strrchr(path, '/') != (path + strlen(path)))    file = strrchr(path, '/') + 1; // set to leaf name  rv = connFTP->Get(path, file, nsFTPConn::BINARY, TRUE, ProgressCB);  if(host)    free(host);  if(path)    free(path);  return(rv);}