title: find a value from loop value and compare
body: <p>I have a list of executable names inside a textfile called <code>b.txt</code>, eg:</p>
  
  <pre><code>notepad.exe, chrome.exe
  </code></pre>
  
  <p>I need to compare them to the current process name, then do something if the application is a match:</p>
  
  <pre><code>    DWORD aProcesses[1024], cbNeeded, cProcesses;
      unsigned int i;
  
      EnumProcesses(aProcesses, sizeof(aProcesses), &amp;cbNeeded);
  
      cProcesses = cbNeeded / sizeof(DWORD);
  
      for (i = 0; i &lt; cProcesses; i++)
      {
          if (aProcesses[i] != 0)
          {
              DWORD processID = aProcesses[i];
              wchar_t szProcessName[MAX_PATH] = TEXT("&lt;unknown&gt;");
              HMODULE hMod;
              DWORD cbNeeded;
  
  
              HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
                  PROCESS_VM_READ,
                  FALSE, processID);
              if (EnumProcessModules(hProcess, &amp;hMod, sizeof(hMod),
                  &amp;cbNeeded))
              {
                  GetModuleBaseName(hProcess, hMod, szProcessName,
                      sizeof(szProcessName) / sizeof(TCHAR));
  
                  _wcslwr_s(szProcessName, wcslen(szProcessName) + 1);
  
                  FILE *pFile;
                  wchar_t *file = L"c:\\b.txt";
                  wchar_t line[100][44];
                  unsigned int i = 0;
                  if (_wfopen_s(&amp;pFile, file, L"r, ccs = UNICODE") == 0)
                  {
                      while (fgetws(line[i], 100, pFile))
                      {
                          i++;
                      }
                  }
  
                  if (line[i] == szProcessName)
                  {
                      cout &lt;&lt; szProcessName + "It's Found";
                  }
  
              }
  
  
          }
      }
  </code></pre>
  
  <p>I don't know why this code is not working. If I test each by <code>std::wcout</code> it outputs correctly, but the compare always fails.</p>