Yes, there still is another solution: Interop.
Open Spy++ if you have it, and get the classname for the window you are after (the browser itself)
There are Win32 functions that allow code to access other processes, the main window, child windows, etc..
A function called FindWindowEx may be what your after:
http://msdn.microsoft.com/library/d...dowreference/windowfunctions/findwindowex.asp
[DllImport("user32.dll")]
private static extern IntPtr FindWindowEx(IntPtr parent, IntPtr childAfter, string className, string windowName);
You can specify the MainWindowHandle (which can be obtained via System.Diagnostics.Process) of the process containing the embedded
web browser as the "parent" parameter. childAfter may be IntPtr.Zero in your circumstance, but read the docs to find out.
className should be that of the WebBrowser control (that you obtained via Spy++), and windowName can be specified as null.
------------------------------------------------------------------------
I'm not sure how to get an IUnknown pointer from just a window handle, but I assume it' possible. If so, a bit of research will get
you there. Maybe somebody will be nice enough to post a solution for you...
------------------------------------------------------------------------
If you get the IUnknown pointer, you can use the following line of code to get an interface for the browser:
SHDocVw.IWebBrowser2 browser =
System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(pUnk, typeof(SHDocVw.IWebBrowser2));
At this point, you can use your existing code to access the HTML.
GL
