Re: Creating event objects
Morten Andersen <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Organization | Arosii Information Systems A/S |
| Message-ID | <[email protected]> |
Hi John
John Pompeii wrote:
[SNIP]
> The real unknown (for me,
> anyway) is what's suppose to happen when an object (once it's created) is
> passed to the method, sent to invokeN in the array of args, and ultimately
> is marshalled by Varient.writeObject. This method supports marshalling
> UnknownPtr's but is that the proper thing to do when the receiving method
> is expecting an interface pointer to some specific interface?
These are all very good questions, which I unfortunately don't think any
of us are able to answer right now. I think we will have to write up a
native testcase for scenarios like this, and then let the COM/C++ guys
(Roger, Robert, Vitaly) figure out how to implement it.
So if I understand you correct, if we can support a testcase like the
following, we would also be able to support your problem?
(pseudo C-code):
IDL:
HRESULT testCallback([in] int callbackTimeout, [in] ICallbackTest*
pCallbackTest);
Implementation:
STDMETHODIMP CDualTest::testCallback(int callbackTimeout, ICallbackTest*
pCallbackTest) {
// setup new thread calling a callback method on pCallbackTest after
callbackTimeout milliseconds?
}
The ICallbackTest should then be a very simple COM-interface with just
one callback method, and Jawin should be able to let a Java class
"implement" this interface, marshal an instance of this Java class to
native code and hand it to the "testCallback()" method? Jawin should
then intercept the native callback, and marshal it into the appropriate
java-method call on the passed java-instance.
Please step in, Roger or Robert, if I have misunderstood anything in
this callback stuff.
Best Regards
Morten