Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.71 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. An outgoing call cannot be made since the application is dispatching an input-synchronous call
  2. IEnumerable swc = SHDocVw.ShellWindows()
  3.     HashSet<WindowInfo> windows = new HashSet<WindowInfo>();
  4.     foreach (SHDocVw.InternetExplorer ie in swc)
  5.     {
  6.         if (!ie.FullName.ToLower().Contains("iexplore.exe"))
  7.             continue;
  8.  
  9.         IntPtr hwnd;
  10.         IEPlugin.IOleWindow window = ie.Document as IEPlugin.IOleWindow;
  11.         window.GetWindow(out hwnd);  
  12.  
  13.         WindowInfo info = new WindowInfo();
  14.         info.handle = hwnd;
  15.         info.extraInfo = ie;
  16.         windows.Add(info);
  17.     }
  18.        
  19. interface IOleWindow : IUnknown
  20. {
  21. ...
  22.     [input_sync]
  23.     HRESULT GetWindow
  24.     (
  25.         [out] HWND *phwnd
  26.     );