Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Question about OleAutomation.

Hi,

I have a an interface that with a method that takes an IDispatch interface
as a parameter, like this:

interface IMyControl: IDispatch
{
	[propput, id(0)] HRESULT select([in] IDispatch obj);
};

I have created an OleAutomation out of IMyInterface and now I want to invoke
the method "select" from within it. How can I do that?

I have already done the following:

IOleControlSite oleControlSite = new OleControlSite(oleFrame,
SWT.NONE,"IMyControl");
OleAutomation auto = new OleAutomation(oleControlSite);
String[] names = {"select"};
int[] ids = auto.getIDsOfNames(names);
auto.setProperty(ids[0], ....); //how do I pass the IDispatch as a
parameter?


Thanks for the help.
Amr





Back to the top