Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to call a MFC dll from Java. So that it feels as if Java launched the MFC UI.

I am developing a MFC dll using IMAPI 2.0 with C++ to burn data on DVD/CD. I want to call this dll from Java & hence the run MFC dll with its UI. This will help in monitoring the burn process.

What I have tried:

I tried loading regular dll from Java using JNI. But need help if we can continuously update the progress of execution to Java from dll.
Posted
Updated 26-Oct-16 23:07pm
v2

You must correct initialize the MFC runtime before the first use, like it is here described.

For updating the UI you must implement an interface function with JNI to the MFC-dll, in which the update (as message parameter) the signaled.

Because the JRE/JNI and the MFC are in different threads you need proper handling in the dll. The article PostThreadMessage Demystified may guide you in the right direction.
 
Share this answer
 
See jni mfc - Google Search[^].

Also, you already posted this question at How to monitor progress of burn using IMAPI 2.0 and pass updates to java[^]. Please do not repost.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900