Re: JNI: Error loading DLL from JNI DDL

Discussion in 'Java' started by vasanth, Jan 25, 2005.

  1. vasanth

    vasanth Guest

    wrote:
    > Hi,
    >
    > I would appreciate it very much if anybody could help me with this.
    >
    > I am in the process of creating a JNI DLL on Nt 4.0 to enable Java
    > applications to access WOSA/XFS devices (in this case a printer

    device).
    > This JNI DLL has a very simple interface (only 3 calls) for which I

    have
    > provided a dual implementation to be able to call the DLL either from
    > C/C++ or from Java.
    > When I test the DLL's functionality using C testprogram everything
    > works perfect. The same from Java turns up a popup with the following

    error:
    > "invalid virtual base addr., GetLastError: 487"
    > This occurs when trying to load the XFS_SUPP.DLL (1 component of the

    WOSA/
    > XFS suite).
    >
    > When I trim down the JNI DLL to contain everything BUT the XFS calls

    (thus
    > not linking the XFS DLLs) I can successfully call the JNI DLL from

    Java.
    >
    > The only thing the errormessage tells me is that an invalid memory

    address is
    > accessed when loading the XFS_SUPP.DLL but I have no idea if I can

    solve this
    > by changing some configuration settings or what.
    > I anyone could provide with some pinters on how to solve this, I

    would be very
    > grateful.
    >
    > Regards,
    > Martin Corino.
    >
    > -----------== Posted via Deja News, The Discussion Network

    ==----------
    > http://www.dejanews.com/ Search, Read, Discuss, or Start Your

    Own

    We got the same message in the following setup.
    Os:- WIN2K
    Application setup C++, MFC.

    Problem Description:-
    In a dialog based mfc application which loads two mfc regular dlls,
    (Say DLL1 and DLL2 where DLL2 uses XFS library
    msxfs.lib,xfs_conf.lib,xfs_supp.lib), the message
    "invalid virtual base addr.; GetLastError 487"
    pops on executing the application.

    Project settings Details:-
    In 'Object/library module' of project settings,the order of
    libs are as Lib1, Lib2 (Lib1 for DLL1 & Lib2 for DLL2).

    Resolution:-
    By changing the order of libs in the project settings,
    that is loading 'Lib2' before 'Lib1', this problem is resolved.
    regards,
    mvk.
    vasanth, Jan 25, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marina
    Replies:
    0
    Views:
    901
    Marina
    Aug 12, 2003
  2. hilz
    Replies:
    1
    Views:
    381
  3. vasanth
    Replies:
    0
    Views:
    605
    vasanth
    Jan 25, 2005
  4. pcarr01
    Replies:
    3
    Views:
    657
    Gordon Beaton
    Feb 17, 2005
  5. Nathan

    Tomcat 5 and JNI dll loading

    Nathan, Apr 1, 2005, in forum: Java
    Replies:
    1
    Views:
    1,013
    Gordon Beaton
    Apr 4, 2005
Loading...

Share This Page