Skip to main content

com4j

1 reply [Last post]
rob80
Offline
Joined: 2007-12-21
Points: 0

got a problem using the com4j Framework (https://com4j.dev.java.net/).
Basically it´s works fine, but it does not work to pass complex datatypes to a com interface. There is an interface, which needs the instance of special class as an argument. First an IllegalArgumentException has been throwed caused by the fact, that the passed argument was not a proxy instance. So I tried to work around and created this argument as a proxy instance.
But now, I get a cast exception. Oviously the com4j Framework tries to cast the argument to the class "Wrapper". Actual it is not a subclass of "Wrapper", the class "Wrapper" is final !
I don´t know, why com4j is doing that. In my opinion com4j only has to marshal the complex datatype correctly to establish the com interoperation.
So, please help me out or explain me, what I´m misdoing.

Thank you and Best regards.

Rob.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
datalogen
Offline
Joined: 2009-02-15
Points: 0

I have exactly the same problem. Did you find a solution to the problem?