I am trying to implement a way of using the EnumChildWindows function using java. However I am running into some problems that I am unsure how to solve.
I have properly declared my native method in my java class like so..
public static native boolean enumChildWindows( long parentHandle, Callback callback, long lparam );
According to MSDN, the syntax of the EnumChildWindows function in user32 is
BOOL EnumChildWindows(
HWND hWndParent,
WNDENUMPROC lpEnumFunc,
LPARAM lParam
);
..so I may seem a bit all unclear here.. but how do I declare my import in my C++ file so that it takes a jobject as one of its parameters i guess
[DllImport("user32")]
extern "C" long EnumChildWindows ( long handle, ??? callback, long lParam );
Also, how do I access it when in the body of my native method..
JNIEXPORT jboolean JNICALL Java_NativeFunctions_enumChildWindows
(JNIEnv *, jclass, jlong handle, jobject callback, jlong lParam)
Basically, I am wanting to do the following
EnumChildWindows( handle, callback, lParam );
but I am unsure of how to go about doing that. Any help would be appreciated.