Re: Creating event objects
Robert Hastings <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <003801c471c9$8e2c4e50$6f00a8c0@seraph> |
I checked in the test case to CallCOMUnitTest. I'm looking at prototyping up the idea in my other email, but I don't think I'll finish this weekend... Robert ----- Original Message ----- From: "John Pompeii" <[email protected]> To: <[email protected]> Sent: Thursday, July 22, 2004 5:45 AM Subject: Re: [JAWIN] Creating event objects > Hi Morton, > > >So if I understand you correct, if we can support a testcase like the > >following, we would also be able to support your problem? > > > >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. > > > > Yep, I think that's pretty much it! It is possible to do this with the > current version of jawin, assuming that I code the C++ COM classes that > implement the event interfaces? Robert, you mentioned that you've done > something similar before, do have any examples? > > thanks, > --john >