Click here to Skip to main content
13,829,108 members
Rate this:
Please Sign up or sign in to vote.
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.
Updated 27-Oct-16 0:07am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190114.1 | Last Updated 27 Oct 2016
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100