else if(ugUninstall.dwMode == AUTO) { ShowMessage(szMessage, TRUE); Delay(5); ShowMessage(szMessage, FALSE); } }  return(TRUE);
} else {  return(TRUE); }
HRESULT CheckInstances(){  char  szSection[MAX_BUF];  char  szClassName[MAX_BUF];  char  szWindowName[MAX_BUF];  char  szMessage[MAX_BUF];  char  szIndex[MAX_BUF];  int   iIndex;  BOOL  bContinue;  HWND  hwndFW;  LPSTR szWN;  LPSTR szCN;  DWORD dwRv0;  DWORD dwRv1;  bContinue = TRUE;  iIndex    = -1;  while(bContinue)  {    ZeroMemory(szClassName,  sizeof(szClassName));    ZeroMemory(szWindowName, sizeof(szWindowName));    ZeroMemory(szMessage,    sizeof(szMessage));    ++iIndex;    itoa(iIndex, szIndex, 10);    lstrcpy(szSection, "Check Instance");    lstrcat(szSection, szIndex);    GetPrivateProfileString(szSection, "Message", "", szMessage, MAX_BUF, szFileIniUninstall);    /* Process Name= key did not exist, so look for other keys */    dwRv0 = GetPrivateProfileString(szSection, "Class Name", "", szClassName, MAX_BUF, szFileIniUninstall);    dwRv1 = GetPrivateProfileString(szSection, "Window Name", "", szWindowName, MAX_BUF, szFileIniUninstall);    if((dwRv0 == 0L) &&       (dwRv1 == 0L))    {      bContinue = FALSE;    }    else if((*szClassName != '\0') || (*szWindowName != '\0'))    {      if(*szClassName == '\0')        szCN = NULL;      else        szCN = szClassName;      if(*szWindowName == '\0')        szWN = NULL;      else        szWN = szWindowName;      if((hwndFW = FindWindow(szClassName, szWN)) != NULL)      {        if(*szMessage != '\0')        {          if((ugUninstall.dwMode != SILENT) && (ugUninstall.dwMode != AUTO))          {            MessageBox(hWndMain, szMessage, NULL, MB_ICONEXCLAMATION);          }          else if(ugUninstall.dwMode == AUTO)          {            ShowMessage(szMessage, TRUE);            Delay(5);            ShowMessage(szMessage, FALSE);          }         }        return(TRUE);      }    }  }  return(FALSE);}