title: Right Mouse Button in FileOpenDialog window gives an error
body: <p>I have a FileOpenDialog that gets a selected folder name, this works perfectly however when I click an item in a folder or another folder with the right mouse button the application crashes and throws an Unhandled Exception:Module Not Found. I'd like to be able to use the right mouse button so I wouldn't want to block it. I'm looking for a solution to handle the input from the Right Mouse Button so the application doesn't crash.</p>
  
  <pre><code>HWND Hwnd;
  std::vector&lt;std::string&gt; openFileDialog(std::vector&lt;COMDLG_FILTERSPEC&gt; filterSpec, bool allowMultiSelect)
  {
  std::vector&lt;std::string&gt; paths;
  
  IFileOpenDialog *pFileOpen;
  
  HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_ALL, IID_IFileOpenDialog, reinterpret_cast&lt;void**&gt;(&amp;pFileOpen));
  if (SUCCEEDED(hr))
  {
      if (allowMultiSelect)
      {
          pFileOpen-&gt;SetOptions(FOS_ALLOWMULTISELECT);
      }
      pFileOpen-&gt;SetFileTypes(filterSpec.size(), filterSpec.data());
  
      hr = pFileOpen-&gt;Show(Hwnd);
      if (SUCCEEDED(hr))
      {
          IShellItemArray* results;
          hr = pFileOpen-&gt;GetResults(&amp;results);
  
          pFileOpen-&gt;GetResults(&amp;results);
          DWORD itemCount = 0;
          DWORD iterator = 0;
          results-&gt;GetCount(&amp;itemCount);
  
          if (SUCCEEDED(hr))
          {
              for (iterator = 0; iterator &lt; itemCount; iterator++)
              {
                  PWSTR pszFilePath;
                  IShellItem *pItem;
                  results-&gt;GetItemAt(iterator, &amp;pItem);
                  hr = pItem-&gt;GetDisplayName(SIGDN_FILESYSPATH, &amp;pszFilePath);
                  if (SUCCEEDED(hr))
                  {
                      LPWSTR path = pszFilePath;
                      std::wstring file = path;
                      std::wstring_convert&lt;std::codecvt_utf8_utf16&lt;wchar_t&gt;&gt; convert;
                      paths.push_back(convert.to_bytes(file));
  
                  }
                  pItem-&gt;Release();
              }
          }
      }
  }
  
  pFileOpen-&gt;Release();
  if (paths.size() == 0)
      paths.push_back("FAILED");
  
  return paths;
  </code></pre>
  
  <p>}</p>