[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] SWT and OLE Automation - how do I queryInterface??
|
Hi,
I am queryInterfacing an IDispatch obj for an interface, but the return int = some negative value
also the int[] obj has null value that is supposed to carry the pointer to the interface queried...
where possibly I could be going wrong?
Any pointer would be a great help.
My dirty code goes here:
-----------------------------------
int[] ppvObject = new int[1];
GUID IID_ICustomInterface = COMObject.IIDFromString("{FA171E68-8E90-4F5F-9320-9FB7DF22D1AE}");
int resultQI = (IDispatchObj1.getDispatch()).QueryInterface(IID_ICustomInterface, ppvObject);
int xyz = ppvObject[0];
OleAutomation aa = IDispatchObj1.getAutomation();
System.out.println("documentation on QueryInterface:"+aa.getDocumentation(xyz));
Variant IDObj2 = aa.getProperty(xyz);
----------------------------------
Also how exactly do i use the return IDispatch object... any code snippet please??!!
Thanks!