[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] Question using ActiveX Support of SWT
|
Hello everybody,
i'm Christian Dein Professional Services of empolis GmbH
(http://www.empolis.com).
I have a question by using the ActiveX Support of the Eclipse SWT Framework.
How could I set values of a Variant which is basically a ByRef argument of
an OleEvent?
oleControlSite.addEventListener(BEFORE_NAVIGATE2, new
OleListener() {
public void handleEvent(OleEvent event) {
if (event.type != BEFORE_NAVIGATE2)
return;
Variant url = event.arguments[1];
if (url.getString() != null) {
NavigationEvent ne = new
NavigationEvent();
ne.setUrl(url.getString());
ne.setCancel(false);
eventBeforeNavigate(ne);
if(ne.isCancel()) {
System.out.println("Cancel
navigation!");
Variant cancel = new
Variant(event.arguments[6].getByRef(), (short)(OLE.VT_BYREF | OLE.VT_BOOL));
System.out.println(cancel.getBoolean());
stop();
}
}
}
});
Thank you for your help!
Best regards
Christian