Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:39:02+00:00 2026-06-17T11:39:02+00:00

I am new in Java, searched for this question in google and stackoverflow, found

  • 0

I am new in Java, searched for this question in google and stackoverflow, found some posts, but still I can’t understand.

I want to use DLL libary (C++) methods from Java. I use JNA for this purpose. JNA found my library but it can’t find my method:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'LoadCurrentData': The specified procedure could not be found.

My code:

package javaapplication1;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;

public class JavaApplication1 {

    public interface LibPro extends Library {
        LibPro INSTANCE = (LibPro) Native.loadLibrary(
            (Platform.isWindows() ? "LibPro" : "LibProLinuxPort"), LibPro.class);

        public  short LoadCurrentData();
    }

    public static void main(String[] args) {
      LibPro sdll = LibPro.INSTANCE;
      sdll.LoadCurrentData();  // call of void function
    }
 }

I looked in my DLL with Depency Walker Tool and saw that my function name has prefix and suffix – it looks like _LoadCurrentData@0

Thanks for response!

P.S. I found good example which works http://tutortutor.ca/cgi-bin/makepage.cgi?/articles/rjna (Listing 6).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:39:02+00:00Added an answer on June 17, 2026 at 11:39 am

    I’d say that you need to apply correct name mapper, as you noticed function name got mangled, you need to register CallMapper that will implement the same mangling as your compiler.

    Here is a revelant entry from JNA homepage:

    Use a dump utility to examine the names of your exported functions to make sure they match (nm on linux, depends on Windows). On Windows, if the functions have a suffix of the form “@NN”, you need to pass a StdCallFunctionMapper as an option when initializing your library interface. In general, you can use a function mapper (FunctionMapper) to change the name of the looked-up method, or an invocation mapper (InvocationMapper) for more extensive control over the method invocation.

    Here is a possibly revelant question: renaming DLL functions in JNA using StdCallFunctionMapper

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i searched for this Problem, and i found some stackoverflow Questions about the same
I have searched in this site a lot of spring.. but i'm really new
I have searched on google and stackoverflow for this problem there are several questions
Sorry for this trivial question, but I am new to programming and I wanted
Java Gurus, I am pretty new for annotations and haven't searched for this a
I'm sorry if this Question is already answered, i searched a lot, but i
I have searched almost every possible question related to this topic but not able
This is a continuation of the question Java rounded Swing JButton . I have
Another question about my implementation. I am fairly new to java/android coming from a
Being new to Java, I am not able to understand the complete build process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.