I'm working with JIntegra java com bridge. I have an object of type Object which true coclass is unknown. I need to check if that object can be casted to specific COM interface (which has a proxy class generated by JIntegra).
views:
399answers:
2
A:
If the proxy class implements a (generated) interface, can you check if the object is an instanceof that?
Chris Kimpton
2008-10-08 10:39:03
No I can't, the generated proxy classes don't follow java conventions.In order to case an object from one interface to another, I need to do some thing like <br/>ISomeInterface = new ISomeInterfaceProxy(someObject); <br/>But this action fails on method invocation and not on creation.
Alex Shnayder
2008-10-08 10:53:28
James Schek
2008-10-09 22:04:47
+1
A:
Call queryInterface()
on the proxy. It should throw an exception if the underlying COM object does not implement the proxy interface.
James Schek
2008-10-09 22:36:37