So im trying to implement callbacks to java functions and I have the honor
of writing my own dll any which way I like. The problem is that my dll
depends on another dll which accepts a group of callbacks as a struct.
How should my C function signature look to accept Java callback methods?
Should it be
int consume_callbacks(void *one, void *two, void *three)?
where one two and three are java functions?
I am running in to a wall here because the example uses a predefined
callback (WNDENUMPROC lpEnumFunc) type which you overide with an
interface (interface
WNDENUMPROC extends StdCallCallbac). Should I simulate that instead, and
typedef three different types based on void*, then re-create those as
interfaces in java with callback methods?
ie
// C code
typedef void* one;
typedef void* two;
typedef void* three;
int consume_callbacks(one my_one, two my_two, three my_three)
//Java code
interface one extends Callback {
boolean callback(); }
Dan