By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

JNI_OnUnload doesn't get called

P: n/a
Hi,

I'm new to both COM and JNI programming and managed to build a DLL to
access a COM object.
Unfortunately, I get an error message telling me that some pointer is
pointing to 0x00000000.

Adding Thread.sleep(6000) after the call to my native function delayed
the error message, so I think it's not a certain call in my code.

Since I didn't know how to debug native code, I simply called
MessageBox() every two or three lines to see where the problem occurs.

The interesting thing is:
I get no MessageBoxes for JNI_OnUnload(), but I do get some for
JNI_OnLoad().
JNI_OnUnload() for example calls CoUninitialize().

When I move the code from JNI_OnUnload() into a different function
that is explicitly called, the error message no longer appears.

Perhaps this was just a coincidence, but I think the problem is that
JNI_OnUnload() does not get called.

Can anybody help?
Thanks in advance.

Regards,

Marvin
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.