GetPrivateProfileString("Site Selector", szKDomain, "", szDomain, MAX_BUF, szFileIniRedirect);
GetPrivateProfileString("Site Selector", szKDomain, "", szDomain, sizeof(szDomain), szFileIniRedirect);
void UpdateSiteSelector(){  DWORD dwIndex;  char  szIndex[MAX_BUF];  char  szKDescription[MAX_BUF];  char  szDescription[MAX_BUF];  char  szKDomain[MAX_BUF];  char  szDomain[MAX_BUF];  char  szFileIniRedirect[MAX_BUF];  ssi   *ssiSiteSelectorTemp;  lstrcpy(szFileIniRedirect, szTempDir);  AppendBackSlash(szFileIniRedirect, sizeof(szFileIniRedirect));  lstrcat(szFileIniRedirect, FILE_INI_REDIRECT);  if(FileExists(szFileIniRedirect) == FALSE)    return;  /* get all dependees for this component */  dwIndex = 0;  itoa(dwIndex, szIndex, 10);  lstrcpy(szKDescription, "Description");  lstrcpy(szKDomain,      "Domain");  lstrcat(szKDescription, szIndex);  lstrcat(szKDomain,      szIndex);  GetPrivateProfileString("Site Selector", szKDescription, "", szDescription, MAX_BUF, szFileIniRedirect);  while(*szDescription != '\0')  {    if(lstrcmpi(szDescription, szSiteSelectorDescription) == 0)    {      GetPrivateProfileString("Site Selector", szKDomain, "", szDomain, MAX_BUF, szFileIniRedirect);      if(*szDomain != '\0')      {        ssiSiteSelectorTemp = SsiGetNode(szDescription);        if(ssiSiteSelectorTemp != NULL)        {          lstrcpy(ssiSiteSelectorTemp->szDomain, szDomain);        }        else        {          /* no match found for the given domain description, so assume there's nothing           * to change. just return. */          return;        }      }      else      {        /* found matched description, but domain was not set, so assume there's no         * redirect required, just return. */        return;      }    }    ++dwIndex;    itoa(dwIndex, szIndex, 10);    lstrcpy(szKDescription, "Description");    lstrcpy(szKDomain,      "Domain");    lstrcat(szKDescription, szIndex);    lstrcat(szKDomain,      szIndex);    ZeroMemory(szDescription, sizeof(szDescription));    ZeroMemory(szDomain,      sizeof(szDomain));    GetPrivateProfileString("Site Selector", szKDescription, "", szDescription, MAX_BUF, szFileIniRedirect);  }}