Menu

#9 getHWND

open
nobody
None
5
2004-03-03
2004-03-03
Robert Bird
No

I am trying to set up a version of webunit that allows
asking for the native window handle ( public Object
getNativeWindowHandle() ) . The implementation
actually happens in ExplorerNativeWebClient with the
following call:

public Object getNativeWindowHandle() {
Object result = new Integer(ivWebBrowser.getHWND());
return result;
}

However, I get the following error:

Error invoking method:getNativeWindowHandle
er:java.rmi.RemoteException: Error invoking
method:java.rmi.RemoteException: Error on invoking:
com.zeborg.webunit.ie.ExplorerNativeWebClient.getNativeWindowHandlejava.lang.reflect.InvocationTargetException
at java/lang/reflect/Method.invoke (Method.java)
at com/zeborg/iorpc/RemoteProcessServer.process
(RemoteProcessServer.java:125)
at com/zeborg/iorpc/RemoteProcessServer.run
(RemoteProcessServer.java:179)
at com/zeborg/webunit/ie/ExplorerIORPCServer.main
(ExplorerIORPCServer.java:35)

RootCause:com.ms.com.ComFailException: (0x80004005)
Unspecified error

at shdocvw/IWebBrowser2.getHWND \(IWebBrowser2.java\)

Any insight you might have into the cause of this error
would be greatly appreciated. I am trying to find a
way to handle modal dialogs (javascript confirm). I
was planning on having a thread that watched for the
dialog and clicked the buttons (JNI), but I need to
know the HWND in order for that to work. This seemed
to be the cleanest way to do that, while allowing for
the possibility that there could be multiple instances
running.

Thanks... Bob

Discussion


Log in to post a comment.