AttachCurrentThread() call crashes Java Application
Hello,
I have injected a DLL having JNI code into Java Application using CreateRemoteThread() function.
Then i created a Thread using CreateThread() function in DLL_PROCESS_ATTACH.
I wanted to attach this thread to JVM already running inside the Java Application. So i used JNI_GetCreatedJVMs to get JVM pointer.
I got the JVM pointer, but when i try to call AttachCurrentThread() Java Application crashes giving EXCEPTION_ACCESS_VIOLATION error.
Please guide me.
Thanks in advance.

