Click here to Skip to main content
13,733,721 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.
Posted 26-Oct-16 22:44pm
Updated 26-Oct-16 23:07pm
v2
Rate this: bad
 
good
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.
  Permalink  
Rate this: bad
 
good
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.
  Permalink  

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
Web01-2016 | 2.8.180920.1 | Last Updated 27 Oct 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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