GetPrivateProfileString("Redirect", "Status", "", szBuf, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Redirect", "Status", "", szBuf, sizeof(szBuf), szFileIniConfig);
long RetrieveRedirectFile(){  long      lResult;  char      szBuf[MAX_BUF];  char      szBufUrl[MAX_BUF];  char      szBufTemp[MAX_BUF];  char      szIndex0[MAX_BUF];  char      szFileIdiGetRedirect[MAX_BUF];  char      szFileIniRedirect[MAX_BUF];  ssi       *ssiSiteSelectorTemp;  if(GetTotalArchivesToDownload() == 0)    return(0);  lstrcpy(szFileIniRedirect, szTempDir);  AppendBackSlash(szFileIniRedirect, sizeof(szFileIniRedirect));  lstrcat(szFileIniRedirect, FILE_INI_REDIRECT);  if(FileExists(szFileIniRedirect))    DeleteFile(szFileIniRedirect);  GetPrivateProfileString("Redirect", "Status", "", szBuf, MAX_BUF, szFileIniConfig);  if(lstrcmpi(szBuf, "ENABLED") != 0)    return(0);  ssiSiteSelectorTemp = SsiGetNode(szSiteSelectorDescription);  if(ssiSiteSelectorTemp != NULL)  {    if(ssiSiteSelectorTemp->szDomain != NULL)      lstrcpy(szBufUrl, ssiSiteSelectorTemp->szDomain);  }  else    /* No domain to download the redirect.ini file from.     * Assume that it does not exist.     * This should trigger the backup/alternate url. */    return(0);  lstrcpy(szFileIdiGetRedirect, szTempDir);  AppendBackSlash(szFileIdiGetRedirect, sizeof(szFileIdiGetRedirect));  lstrcat(szFileIdiGetRedirect, FILE_IDI_GETREDIRECT);  GetPrivateProfileString("Redirect", "Description", "", szBuf, sizeof(szBuf), szFileIniConfig);  WritePrivateProfileString("File0", "desc", szBuf, szFileIdiGetRedirect);  GetPrivateProfileString("Redirect", "Server Path", "", szBuf, sizeof(szBuf), szFileIniConfig);  AppendSlash(szBufUrl, sizeof(szBufUrl));  lstrcat(szBufUrl, szBuf);  SwapFTPAndHTTP(szBufUrl, sizeof(szBufUrl));  if(WritePrivateProfileString("File0", "url", szBufUrl, szFileIdiGetRedirect) == 0)  {    char szEWPPS[MAX_BUF];    if(NS_LoadString(hSetupRscInst, IDS_ERROR_WRITEPRIVATEPROFILESTRING, szEWPPS, MAX_BUF) == WIZ_OK)    {      wsprintf(szBufTemp, "%s\n    [%s]\n    %s=%s", szFileIdiGetRedirect, "File0", szIndex0, szBufUrl);      wsprintf(szBuf, szEWPPS, szBufTemp);      PrintError(szBuf, ERROR_CODE_SHOW);    }    return(1);  }  lResult = DownloadFiles(szFileIdiGetRedirect,               /* input idi file to parse                 */                          szTempDir,                          /* download directory                      */                          diAdvancedSettings.szProxyServer,   /* proxy server name                       */                          diAdvancedSettings.szProxyPort,     /* proxy server port                       */                          diAdvancedSettings.szProxyUser,     /* proxy server user (optional)            */                          diAdvancedSettings.szProxyPasswd,   /* proxy password (optional)               */                          FALSE,                              /* show retry message                      */                          NULL,                               /* receive the number of network retries   */                          TRUE,                               /* ignore network error                    */                          NULL,                               /* buffer to store the name of failed file */                          0);                                 /* size of failed file name buffer         */  return(lResult);}