GetPrivateProfileString(szComponentSection, "Archive Uncompressed", "", siCTemp->szArchiveNameUncompressed, sizeof(szBuf), szFileIni);
void InitSiComponents(char *szFileIni){  DWORD dwIndex0;  DWORD dwIndex1;  int   iCurrentLoop;  char  szIndex0[MAX_BUF];  char  szIndex1[MAX_BUF];  char  szBuf[MAX_BUF];  char  szComponentKey[MAX_BUF];  char  szComponentSection[MAX_BUF];  char  szDependency[MAX_BUF];  char  szDependee[MAX_BUF];  char  szSTSection[MAX_BUF];  char  szDPSection[MAX_BUF];  siC   *siCTemp            = NULL;  siCD  *siCDepTemp         = NULL;  siCD  *siCDDependeeTemp   = NULL;  /* clean up the list before reading new components given the Setup Type */  DeInitSiComponents(&siComponents);  /* Parse the Setup Type sections in reverse order because   * the Custom Setup Type is always last.  It needs to be parsed   * first because the component list it has will be shown in its   * other custom dialogs.  Order matters! */  for(iCurrentLoop = 3; iCurrentLoop >= 0; iCurrentLoop--)  {    lstrcpy(szSTSection, "Setup Type");    itoa(iCurrentLoop, szBuf, 10);    lstrcat(szSTSection, szBuf);    /* read in each component given a setup type */    dwIndex0 = 0;    itoa(dwIndex0, szIndex0, 10);    lstrcpy(szComponentKey, "C");    lstrcat(szComponentKey, szIndex0);    GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIni);    while(*szComponentSection != '\0')    {      GetPrivateProfileString(szComponentSection, "Archive", "", szBuf, sizeof(szBuf), szFileIni);      if((*szBuf != '\0') && (SiCNodeFind(siComponents, szComponentSection) == NULL))      {        /* create and initialize empty node */        siCTemp = CreateSiCNode();        /* store name of archive for component */        lstrcpy(siCTemp->szArchiveName, szBuf);                /* get short description of component */        GetPrivateProfileString(szComponentSection, "Description Short", "", szBuf, sizeof(szBuf), szFileIni);        lstrcpy(siCTemp->szDescriptionShort, szBuf);        /* get long description of component */        GetPrivateProfileString(szComponentSection, "Description Long", "", szBuf, sizeof(szBuf), szFileIni);        lstrcpy(siCTemp->szDescriptionLong, szBuf);        /* get commandline parameter for component */        GetPrivateProfileString(szComponentSection, "Parameter", "", siCTemp->szParameter, MAX_BUF, szFileIni);        /* set reference name for component */        lstrcpy(siCTemp->szReferenceName, szComponentSection);        /* get install size required in destination for component.  Sould be in Kilobytes */        GetPrivateProfileString(szComponentSection, "Install Size", "", szBuf, sizeof(szBuf), szFileIni);        if(*szBuf != '\0')          siCTemp->ullInstallSize = _atoi64(szBuf);        else          siCTemp->ullInstallSize = 0;        /* get install size required in system for component.  Sould be in Kilobytes */        GetPrivateProfileString(szComponentSection, "Install Size System", "", szBuf, sizeof(szBuf), szFileIni);        if(*szBuf != '\0')          siCTemp->ullInstallSizeSystem = _atoi64(szBuf);        else          siCTemp->ullInstallSizeSystem = 0;        /* get install size required in temp for component.  Sould be in Kilobytes */        GetPrivateProfileString(szComponentSection, "Install Size Archive", "", szBuf, sizeof(szBuf), szFileIni);        if(*szBuf != '\0')          siCTemp->ullInstallSizeArchive = _atoi64(szBuf);        else          siCTemp->ullInstallSizeArchive = 0;        /* get attributes of component */        GetPrivateProfileString(szComponentSection, "Attributes", "", szBuf, sizeof(szBuf), szFileIni);        siCTemp->dwAttributes = ParseComponentAttributes(szBuf);        /* get the random percentage value and select or deselect the component (by default) for         * installation */        GetPrivateProfileString(szComponentSection, "Random Install Percentage", "", szBuf, sizeof(szBuf), szFileIni);        if(*szBuf != '\0')        {          siCTemp->lRandomInstallPercentage = atol(szBuf);          if(siCTemp->lRandomInstallPercentage != 0)            siCTemp->lRandomInstallValue = RandomSelect();        }        /* get all dependencies for this component */        dwIndex1 = 0;        itoa(dwIndex1, szIndex1, 10);        lstrcpy(szDependency, "Dependency");        lstrcat(szDependency, szIndex1);        GetPrivateProfileString(szComponentSection, szDependency, "", szBuf, sizeof(szBuf), szFileIni);        while(*szBuf != '\0')        {          /* create and initialize empty node */          siCDepTemp = CreateSiCDepNode();          /* store name of archive for component */          lstrcpy(siCDepTemp->szReferenceName, szBuf);          /* inserts the newly created component into the global component list */          SiCDepNodeInsert(&(siCTemp->siCDDependencies), siCDepTemp);          ProcessWindowsMessages();          ++dwIndex1;          itoa(dwIndex1, szIndex1, 10);          lstrcpy(szDependency, "Dependency");          lstrcat(szDependency, szIndex1);          GetPrivateProfileString(szComponentSection, szDependency, "", szBuf, sizeof(szBuf), szFileIni);        }        /* get all dependees for this component */        dwIndex1 = 0;        itoa(dwIndex1, szIndex1, 10);        lstrcpy(szDependee, "Dependee");        lstrcat(szDependee, szIndex1);        GetPrivateProfileString(szComponentSection, szDependee, "", szBuf, sizeof(szBuf), szFileIni);        while(*szBuf != '\0')        {          /* create and initialize empty node */          siCDDependeeTemp = CreateSiCDepNode();          /* store name of archive for component */          lstrcpy(siCDDependeeTemp->szReferenceName, szBuf);          /* inserts the newly created component into the global component list */          SiCDepNodeInsert(&(siCTemp->siCDDependees), siCDDependeeTemp);          ProcessWindowsMessages();          ++dwIndex1;          itoa(dwIndex1, szIndex1, 10);          lstrcpy(szDependee, "Dependee");          lstrcat(szDependee, szIndex1);          GetPrivateProfileString(szComponentSection, szDependee, "", szBuf, sizeof(szBuf), szFileIni);        }        // locate previous path if necessary        lstrcpy(szDPSection, szComponentSection);        lstrcat(szDPSection, "-Destination Path");        if(LocatePreviousPath(szDPSection, siCTemp->szDestinationPath, MAX_PATH) == FALSE)          ZeroMemory(siCTemp->szDestinationPath, MAX_PATH);        /* inserts the newly created component into the global component list */        SiCNodeInsert(&siComponents, siCTemp);      }      ProcessWindowsMessages();      ++dwIndex0;      itoa(dwIndex0, szIndex0, 10);      lstrcpy(szComponentKey, "C");      lstrcat(szComponentKey, szIndex0);      GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIni);    }  }  sgProduct.dwNumberOfComponents = dwIndex0;}