MFC dll in MAC

Hello,
I have a JNI native method, that interacts with a VC++ dll. So I wrotea MFC dll to establish connection between my Java program and that VC++ dll. It works just fine. What do I do if I have to port my Java application so that it runs on Mac ??
Thanks a lot !!

No, it's not possible. DLLs don't work on mac. As soon as you start using JNI, you loose java's portability and you have to rewrite (or at least recompile) all the native code for each platform you intend to support. To run on mac, you'd have to compile a mac-form shared library (don't know what they're called on mac). If you can find a VC++ compiler for mac that deals correctly with MFC (doesn't sound very likely), then you may be able to just recompile your native code. Otherwise, you'll have to rewrite it in a language that mac supports. I think cotton's right--reach for the kleenex.

Similar Messages

  • Problem: Socket connection is not creating in machine, through utility program (MFC Dll), on ListDisplay service port - 3334 (on separate machine), while we are able to telnet on same ListDisplay service port - 3334 from same issue machine on same time

    Problem: Socket
    connection is not creating in machine, through utility program (MFC Dll), on ListDisplay service port - 3334 (on separate machine), while we are able to telnet on same ListDisplay service port - 3334 from same issue machine on same time
    Environment: -
    OS:
    Windows XP SP2/7
    Code:
    VC 6.0
    Dll: MFC
    Problem Description: -
    We have written a utility program which create socket (Using windows standard method [MFC]), and then make connection with another service (List Display) running
    on port 3334 in different machine and retrieve the required list data. This program was working fine in almost all the machines.
    But, we have received a severe intermittent issue on two machines. Client is facing issue in displaying the list data from port 3334.
    Attempt: -
    First we tried to debug code, and we come to know that socket is not creating in utility program. So we tried to telnet on ListDisplay service port 3334 and we were surprised that we were able to telnet, then we opened some more
    telnet window on same port 3334 around (6 to 8) window, and each cmd connected properly. But we were not able to create socket from utility program.
    Problem is severe because issue is intermittent.
    We have tried all the way, but we are not able to figure it out, that what can be the exact problem and what are the conditions, when utility program will not
    connect with ListDisplay service on port 3334.
    Kindly assist to resolve this issue. For any help, we would be really thankful.

    Hi,
    According to your description, it seems that you have created an utility program which is making connection with another service port 3334, however, two clients are facing issue in display the data list from port 3334.
    Port: 3334/TCP
    3334/TCP - Known port assignments (1 record found)
    Service
    Details
    Source
    directv-web
    Direct TV Webcasting
    IANA
    Since the port 3334 is used by directv-web service, I'd like to suggest check this service it is working well on the problematic clients.
    1. The client can be resolved in DNS well? Please run "nslookup" in the prompt command.
    2. Is there any 3rd party application interrupting? Do test in clean boot.
    2. Strongly suggest you run process monitor tool to analysis it.
    I am looking forward to your reply if you have any updated on your side.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Palm Desktop Fails at startup wiht AppName: palm.exe AppVer: 4.1.4.0 ModName: mfc.dll

    Folks, Wifes phone appears to have something wrong with the address book. When she syncs to the palm desk top we get the following error at palm desktop startup : Palm Desktop Fails at startup wiht AppName: palm.exe AppVer: 4.1.4.0 ModName: mfc.dll .
    If i remove the address folder the desktop works until we sync again. Help!
    Tony (fixer of wife phone problems.)
    Post relates to: Treo 650 (Sprint)

    There may be database corruption causing the issue. Click on the following link for the program called DbFixiT. This program has a trial version that you can download and install on your Palm OS device. The trial version will scan for database corruption and then report the corruption. You can then find the records causing the problem and fix them yourself or you can purchase the program and have it automatically fix the records.
    http://www.pimlicosoftware.com/dbfixit.htm
    Remove the address folder like you did so you can start up palm desktop. Sync DBfixit to the phone using quick install. Scan for db corruption on the device and Blobs in the calendar. After that is done, sync the Treo to the PC with the conduits set at handheld overwrites desktop. This will create a new "clean" address book on the PC and this should allow Palm desktop to open correctly. 
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://www.palm.com/us/support/treo/treo650sprint/
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.
    Post relates to: Palm i705

  • Debbugging MFC DLL with TestStand.

    I am in the process of evaluating TestStand and am very impressed with the tool. I created an MFC DLL with my existing C++ test code and have succesfully executed it through Teststand using the flexible prototype adapter. What seems to be missing is the ability to debug the DLL in Visual studio. I'm not sure if I need to have Visual Studio reference TestStand for DLL testing or visa versa. Please advise, as this is the last item I need to confirm prior to purchase. Is this a feature on version 2.0 ?? Thanks in advance.

    Mark-
    You can debug DLLs from TestStand that were created as debuggable DLLS in their original ADE by launching the TestStand Sequence Editor (\TestStand\Bin\SeqEdit.exe) from within your DLL's ADE. In your case you would run the SeqEdit.exe as an external process from within the Visual C++ development environment.
    Here is the description of how to do this from pg 12-12 in the TestStand User Manual that should already be installed on your computer under Start>>Programs>>National Instruments TestStand>>Online Help
    "To debug a DLL, create the DLL with debugging enabled in
    LabWindows/CVI or in another ADE. To debug DLLs, you must launch
    the sequence editor or run-time operator interface from LabWindows/CVI
    or the other ADE. In LabWindows/CVI, you use the Select
    External
    Process command in the Run menu of the Project window to identify the
    executable for the sequence editor or run-time operator interface. You then
    use the Run command to start the executable.
    If you select the Step Into command in TestStand while execution is
    currently suspended on a step that calls into a LabWindows/CVI DLL that
    you are debugging, LabWindows/CVI breaks at the first statement in the
    DLL function."
    Hope this helps!
    Regards,
    Richard McDonell
    National Instruments

  • Add num edit control to existing MFC DLL

    Hi,
    I'm using Visual C++ 6.0 and Visual Studio 6.0 SP3, with Measurement Studio 6.0.0 (eval version).
    I have a C++ DLL which is using shared MFC.  It holds various dialogs that my app needs.  Onto the waveform dialog, I want to add NI graph (not 3D graph) and num edit controls.
    I looked at the tutorial for "Manually Adding Components to My MFC-Based Project" but it seems that the additional steps don't apply to either of the controls I'm adding.
    Currently my waveform dialog contains only VS controls, and it works as expected both in the Visual Studio debugger and outside of it.
    So in the Visual Studio resource editor, I right-click, select "Insert ActiveX Control", and select the "CWNumEdit Control (National Instruments)", and the path shown is "C:\\Windows\system32\cwui.ocx".  I change its style so it looks like the classic control, and change its name.  My project builds and links with no additional header files or libs added to the project.*
    Now I run my app in the Visual Studio Debugger.  But when I call the code to create an instance of my dialog, it returns a 0 instead of a handle (indicating that it failed to create the object).  (I can't step into the call to create the dialog.)  But when I call GetLastError() it returns a 0, indicating no error!
    *I believe I at some point had some old Measurement Studio stuff loaded, which apparently had come along with other National Instruments installs that I had done. Is that possibly confusing my compile/link?
    What am I missing? Thanks in advance for any help ...

    Hi B.Anderson,
    You may be missing some components to your project. Here's a thorough KnowledgeBase article that discusses this:
    Adding Measurement Studio Controls to an MFC Project in Microsoft Visual C++
    If going through that doesn't help. Could you post a section of your code that is causing the problem and also show what libraries you have included?
    Take care!
    Tanya V
    National Instruments
    LabVIEW Platform Product Support Engineer

  • How to call MFC Dll Dialog

    Hi,
    I have created a MFC regular dialog as a dll(TestDialog). And exposed the entire class. Did not expose any specific member function.
    Then i created one more MFC dialog based exe and trying to call my dll.
    I did the below settings:
    Input: TestDialog.lib
    Include : header file
    Now i am calling as
    CTestDialog dlg;
    m_pMainWnd = &dlg;
    dlg.DoModal().
    I am not getting any dialog.
    Can anyone please help me on this.
    Thanks

    sorry it maybe because of zip file. 
    i will write a step.
    just simple. 
    i use win32 dll with mfc support with exported some symbol. name DialogInDll
    create dialog and create class for it. TestDlg
    you will see like this  DialogInDll
    // This class is exported from the DialogInDll.dll
    class DIALOGINDLL_API CDialogInDll {
    public:
    CDialogInDll(void);
    ~CDialogInDll();
    // TODO: add your methods here.
    void showdlg(); // function for the show dialog.
    extern DIALOGINDLL_API int nDialogInDll;
    DIALOGINDLL_API int fnDialogInDll(void);
    //--------------TestDlg .h----------------------------------
    #pragma once
    #include "resource.h"
    // TestDlg dialog
    class TestDlg : public CDialogEx
    DECLARE_DYNAMIC(TestDlg)
    public:
    TestDlg(CWnd* pParent = NULL); // standard constructor
    virtual ~TestDlg();
    // Dialog Data
    enum { IDD = IDD_TESTDLG };
    protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
    DECLARE_MESSAGE_MAP()
    //-----------------------------DialogInDll.cpp-------------------------------
    // add this code
    void CDialogInDll::showdlg ()
    AFX_MANAGE_STATE(AfxGetStaticModuleState( )); // this is very important
    TestDlg dlg;
    dlg.DoModal();
    CDialogInDll::CDialogInDll(void)
    CDialogInDll::~CDialogInDll()
    ///compile.....
    //===================================
    // from exe make function.
    // include DialogInDll.h/ copy lib file to source folder / add DialogInDll.lib to linker in project property.
    void test ()
    CDialogInDll cd;
    cd.showdlg ();
    cd.la.name = "Test";
    CString str(CString(cd.la.name.c_str()));
    AfxMessageBox (str);

  • Labview call VC + + MFC DLL

    I have a VC + + MFC in DLL, which has a function EFS_ACCESS_DLLEXT USHORT __stdcall exp_Read_i (CString & szi); use labview to how to call?

    Is this the same as your question here?

  • MFC - is there any way, to make the MFC work on Mac OS X

    Hello,
    I'm new to programming on Mac OS X. And I just want to know, if there is a way to compile the MFC (M$ Foundation Classes) for OS X?
    Or is there any other possibility to use them?
    I searched in different Forums, asked Mr Google, but didn't find a good answer.
    Well, I didn't find a positive answer...
    Maybe someone here, has any idea about it or a hint, that can help. A simple NO is not enough...
    THX tobschwe

    Well, the last time I looked, the underlying MFC concepts aren't totally foreign to OS X. You could probably (with SUBSTANTIAL effort) write a package that presents the MFC API, but implements it in Cocoa. But that's what you'd have to do, because Cocoa has none of the underlying library functions used by MFC's Windows implementation, and the Cocoa implementations of the underlying concepts and the relationships between them vary in subtle ways from the Windows implementations.
    Which is why wise men simply say "NO".

  • MFC Extension DLL or MFC DLL with "Automation"

    I've been planning a project for quite some time now that uses MFC code and is heavily object oriented. A couple MFC applications run on top of the dll formed platform and draw on various functional objects stored in a DLL. For the time being, I've been
    struggling to get them to link together, so I was wondering what kind of DLL I should use.
    Both Extension DLL's and the feature automation have their merits. But when the Extension DLL is selected, the Automation option is greyed out. What exactly is the difference and which one would be better to use.
    Until such a time I attempt to port the project over to another platform, I don't intend to use non-MFC software run on top of these libraries so non-MFC shouldn't be an issue.

    If you want to build automation components, you'll want to use a regular DLL.
    The following help topics might help clarify:
    Extension DLLs
    Using Database, OLE, and Socket Extension DLL's in Regular DLLs
    Think of it this way. An extension DLL extends MFC, so can only be utilized by an MFC based application.But a COM DLL is a stand alone component, that can be utilized by non-MFC applications, which by definition precludes them from being extension
    DLL's.
    Sincerely,
    Ed Dore

  • Forum for handling high DPI scaling with MFC dlls

    Hi, 
    I have posted a related query on forum Windows Desktop Development forums > Application Compatibility for Windows Desktop Development.
    But have not got any replies yet. Please help. 
    Here is a link to my query: http://social.msdn.microsoft.com/Forums/en-US/c1d36a88-2dbb-4669-b0d4-d553f6fe63a5/scaling-dialogs-and-property-pages-in-a-mfc-application-to-render-correctly-on-high-dpi-devices?forum=windowscompatibility
    Thanks
    Parul Gupta

    Might also try here.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Issue in using DLLs from a VC++ 6.0 MFC application

    Hi,
    I am using Labview 7.1 for creating VIs.I have created DLLs for accessing
    these
    VIs from a VC++ application. The VC++ 6.0 project is created using MFC app
    wizard. When I try to execute the VC++ project in Debug configuration it
    works
    fine. When I try to execute the same in release configuration I get an
    error as
    shown in the attachment.
    Attachments:
    labviewWError.jpg ‏132 KB

    Hi Mukund!
    I found this response on another forum thread that looked like it could help you out:
    ==============================================================
    MSVC++ error (system error 998)
    This is actually a Microsoft issue. It has something to do with static and
    dynamic linking of the MFC DLL. Our R&D engineers have verified this with projects created with no LabVIEW code at all (that is why we believe it to be solely a Microsoft issue). There are three options at this time:
    1. Link with the DLL form of MFC.
    2. Do not link with the .lib from the LV DLL, instead use LoadLibrary and GetProcAddress to dynamically load the DLL and call the function.
    3. Use the VC delayload feature to make the LV DLL not get loaded until the first call is made into it. See VC help on "delayload" for information on setting this up.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    ==============================================================
    Hope this helps!
    Travis H.
    National Instruments
    Travis H.
    LabVIEW R&D
    National Instruments

  • Using NI controls in a DLL running from a non-MFC application

    Hello,
    I am developing a DLL library for use with a non-MFC third party application. The DLL I am currently working on displays a MFC dialog, and works fine from the third party app, as long as I don't add any NI Measurement Studio controls. When I add in a CNiGraph control, the dialog window can't be created.
    Does anyone have any suggestoins about this?
    Thanks,
    -Robert

    Hello Robert,
    The setup that you have here sounds perfectly valid and should have no errors. The firts thing to check is that you have enabled support for ActiveX in your MFC DLL. When you run the new project wizard one of the options is to enable ActiveX this adds some initialization code to enable the ActiveX container.
    You can test this by adding any other ActiveX control to your dll and give it a try. If you get the same error then most likely the ActiveX container is not properly initilized.
    Let me know how this goes.
    Regards,
    Juan Carlos
    N.I.

  • Get TS_Err_DLLNotLoadable(-17004) using MFC Regular DLL

    I made a regular MFC dll and tried to load it from TestStand 3.0. I got "-17004; Could not load DLL or library." Any ideas? Thanks.

    zZn -
    There must be some dependency that the DLL has to another DLL that cannot be resolved or DLLMain is returning an error.  Use depends.exe to determine any DLL dependencies, and if you have defined a DLLMain, try to step through it to see what might be happening.
    Scott Richardson
    National Instruments

  • How to create dll in Visual Studio 2008 in Visual C++

    Hello,
    I have insatlled Visual Studio 2008. I have to create DLL in Project
    type Visual C++.
    Which Template i have to select to reate dll, MFC DLL or Class
    Library?.
    I have to call or import this dll in Windows Forms Application. How
    can i do this. Please give details procedure to do this.

    If we look at how  AFX_CLASS_EXPORT and AFX_CLASS_IMPORT  are defined in afxv_dll.h we see the following.
    #define AFX_CLASS_EXPORT __declspec(dllexport)
    #define AFX_CLASS_IMPORT __declspec(dllimport)
    So, when exporting our classes from our DLL we want the class declarations from the DLL to look like this:-
    class __declspec(dllexport) CMyClass : public CObject
    And, when importing our C++ classes into our application we want the class declarations from the DLL to look like this:-
    class __declspec(dllimport) CMyClass : public CObject
    OK, so here's how I do things.
    In the stdafx.h file for the export DLL, include two #defines at the bottom of the file like this:-
    #define _MYLIB_DLLAPI_
    #define _MYLIB_NOAUTOLIB_
    Now, in the main header file for your DLL, say mylib.h (the main 'point of entry' header for your DLL that you will include in you application later), add the following at the top:-
    // The following will ensure that we are exporting our C++ classes when
    // building the DLL and importing the classes when build an application
    // using this DLL.
    #ifdef _MYLIB_DLLAPI_
        #define MYLIB_DLLAPI  __declspec( dllexport )
    #else
        #define MYLIB_DLLAPI  __declspec( dllimport )
    #endif
    // The following will ensure that when building an application (or another
    // DLL) using this DLL, the appropriate .LIB file will automatically be used
    // when linking.
    #ifndef _MYLIB_NOAUTOLIB_
    #ifdef _DEBUG
    #pragma comment(lib, "mylibd.lib")
    #else
    #pragma comment(lib, "mylib.lib")
    #endif
    #endif
    Now, just declare all the C++ classes you want exported from the DLL like this:-
    (Note: Any C++ classes not declared with MYLIB_DLLAPI will not be exported from the DLL)
    class MYLIB_DLLAPI CMyClass : public CObject
    regards,
    Matt John
    complete variety of quilts is availabale here!
     PR: wait...
     I: wait...
     L: wait...
     LD: wait...
     I: wait...
    wait...
     Rank: wait...
     Traffic: wait...
     Price: wait...
     C: wait...

  • Webview crash WebEngine load method - Win + Mac

    The code below crashes on Win 7 JavaFX 2.0 and Mac OS X 10.6 Java FX 2.0 EA
    On Win 7 32 bits under Java 7 it crashes in WebPane.dll
    On Mac OS X I get: Invalid memory access of location 0x170 rip=0x11e7c0d67
    The culprit is
    eng.load("https://graph.facebook.com/me/friends?access_token="+token); in the change listener.
        public static void main(String[] args) {
            Application.launch(args);
        @Override
        public void start(Stage primaryStage) {
         primaryStage.setTitle("Hello World");
             WebView view = new WebView();
            final WebEngine eng = view.getEngine();
            eng.load("https://graph.facebook.com/oauth/authorize?" + "client_id=" +
                   API_KEY +  "&"
                   + "redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup);
            final TextField locationField = new TextField("http://www.oracle.com/us/index.html");
            locationField.setMaxHeight(Double.MAX_VALUE);
            Button goButton = new Button("Go");
            goButton.setDefaultButton(true);
            EventHandler<ActionEvent> goAction = new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent event) {
                    eng.load(locationField.getText().startsWith("http://") ? locationField.getText() :
                            "http://" + locationField.getText());
            goButton.setOnAction(goAction);
            locationField.setOnAction(goAction);
            eng.locationProperty().addListener(new ChangeListener<String>() {
                @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
                    locationField.setText(newValue);
                        if (newValue.startsWith("http://www.facebook.com/connect/login_success.html")) {
                                           URLCodec codec = new URLCodec();
                            try {
                             String s = codec.decode(newValue);
                              String[] splits = s.split(",");
                             try {
                                 String json = s.substring(s.indexOf('#') + 1, s.length());
                                 System.out.println("JSON = " + json);
                                 String st = URLDecoder.decode(json, "UTF-8");
                                 System.out.println(st);
                                 String params[] = st.split("&");
                                 HashMap<String, String> parmsMap = new HashMap<String, String>();
                                 for (String param : params) {
                                  String temp[] = param.split("=");
                                  parmsMap.put(temp[0], java.net.URLDecoder.decode(temp[1], "UTF-8"));
                                 String token = parmsMap.get("access_token");
                                 System.out.println(token);
                                 eng.load("https://graph.facebook.com/me/friends?access_token="+token);
                             } catch (Exception e) {
                            } catch (DecoderException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
            GridPane grid = new GridPane();
            grid.setVgap(5);
            grid.setHgap(5);
            GridPane.setConstraints(locationField, 0, 0, 1, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.SOMETIMES);
            GridPane.setConstraints(goButton,1,0);
            GridPane.setConstraints(view, 0, 1, 2, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
            grid.getColumnConstraints().addAll(
                    new ColumnConstraints(100, 100, Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER, true),
                    new ColumnConstraints(40, 40, 40, Priority.NEVER, HPos.CENTER, true)
            grid.getChildren().addAll(locationField, goButton, view);
            Scene scene = new Scene(grid, 1024, 768);
    {code}
    Edited by: user10787071 on Oct 8, 2011 9:52 PM
    Edited by: user10787071 on Oct 8, 2011 9:53 PM
    Edited by: user10787071 on Oct 8, 2011 9:55 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Created the following JIRA http://javafx-jira.kenai.com/browse/RT-17313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Maybe you are looking for

  • Trigger to populate table in sql server database

    Maybe this isn't the right board to post this in, but here goes: We have an Oracle 9i database, with a table that get's populated with a new record every minute or so. We need to take some values from the newly inserted record and populate a table in

  • How can I connect to multiple Macs over the internet?

    I have forwarded the ports on my Airport Extreme as follows: 10.0.1.3 being assigned to my Mac Mini. I also have a MacBook Pro at home I would like access to which has the 10.0.1.4 reserved/assigned. I cannot connect to it because the port forwarding

  • Request Timedout error while submitting data in Planning thorugh Smart view

    Hi , We are getting Request Timed out error when trying to submit data to Planning application using Smart view. " Cannot connect to the provider because:The request Timed out. Contact your administrator to increase netRetryCount and netRetryInterval

  • Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7

    Hi All, I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also. It suppose to insert a row into header and then into lines. Its inserting the row into both the tables but

  • ITunes Feed Not Updating from Podbean -- Validator Says It's Fine

    We've done nearly 80 episodes over 2+ years and have had some issues with the feed. This time, I've tried EVERYTHING!  I've resaved the podcast with a new file name, deleted it and reuploaded it, changed the post, fixed everything in Feedvaildator.co