M
Manuel Leclerc
Hi, and sorry for the poor english.
I create a native (win32) thread in a java process (by code injection,
with the CreateRemoteThread-LoadLibrary trick).
Next, I use the folowing APIs :
- JNI_GetCreatedJavaVMs
- AttachCurrentThread
- JAWT_GetAWT
Next, I use a win32 API (EnumWindows) and obtain a Windows Handle (type
HWND) belonging to the Java process.
Finally, I use GetComponent and get a "jobject" corresponding to the
'hwnd'.
It works: I am able to call some java methods.
My question:
What about the GC? Should I call some "free" method when I no longer
need to keep the "jobject" ?
I create a native (win32) thread in a java process (by code injection,
with the CreateRemoteThread-LoadLibrary trick).
Next, I use the folowing APIs :
- JNI_GetCreatedJavaVMs
- AttachCurrentThread
- JAWT_GetAWT
Next, I use a win32 API (EnumWindows) and obtain a Windows Handle (type
HWND) belonging to the Java process.
Finally, I use GetComponent and get a "jobject" corresponding to the
'hwnd'.
It works: I am able to call some java methods.
My question:
What about the GC? Should I call some "free" method when I no longer
need to keep the "jobject" ?