[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-swt-dev] OLE IDispatch subclass as invoke variant parameter
|
Simone,
Did you try using Java COM Bridge (JACOB). They have a very good support for
COM and ActiveX. The URL is http://danadler.com/jacob/. There you can find
the library and support for ActiveX / COM. I used it for MS-Project
automation and found it quite helpful.
Cheers
- Samir
-----Original Message-----
From: platform-swt-dev-admin@xxxxxxxxxxx
[mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of Simone Gianni
Sent: Sunday, 28 November 2004 5:39 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: [platform-swt-dev] OLE IDispatch subclass as invoke variant
parameter
Hi Devs,
sorry to bother you, but it seems this is something nobody knows about.
I need to call an ActiveX method, passing a subclass of IDispatch as a
parameter. Now, in java it would be something like :
NeededClass c = new NeededClass(param1, param2);
activex.method(a,b,c)
With invoke it is something like this :
Variant okcmd = new Variant(command);
Variant okparam = new Variant(param);
auto.invoke(METHOD_ExecCommand, new Variant[] { okcmd, okparam});
But param should be something like :
param = new NeededClass();
Where NeededClass extends IDispatch. I've searched in SWT code, tryed to
allocate global ram, create the class in java, call movememory and pass
it by reference, but it should not be passed by reference (JVM simply
crashes with EXCEPTION_ACCESS_VIOLATION). Maybe I should obtain an
OleAutomation to the needed class, set properties on it, and then wrap
it in a variant .... but basically i'm stuck on this.
Can anybody help?
Simone
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev