Thread exit function for calls into the Microsoft VM.
VOID __cdecl UnprepareThreadForJava(PVOID pThreadEntryFrame);
Returns true if successful; otherwise, returns false.
pThreadEntryFrame | An instance of a thread entry frame. This pointer is maintained by the Microsoft VM and is the same pointer used in PrepareThreadForJava when entering the Microsoft VM. |
This method should be called from any thread when exiting the Microsoft VM.
Allocate ThreadEntryFrames on the associated thread's stack rather than in the heap. The Microsoft virtual machine treats the ThreadEntryFrame as a stack frame on the associated thread's stack. All other stack frames are internally allocated on the associated thread's stack. Some code assumes that stack frame addresses are in monotonically increasing order. Linking in a ThreadEntryFrame that violates that assumption may cause problems. The ThreadEntryFrame should be a local variable in the method that calls UnprepareThreadForJava.
Note that garbage collection is disabled between PrepareThreadForJava and UnprepareThreadForJava. An application can hang if each thread waits until it is about to exit before calling UnprepareThreadforJava.