Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__stdcall #65

Closed
goto1134 opened this issue Jun 22, 2016 · 4 comments
Closed

__stdcall #65

goto1134 opened this issue Jun 22, 2016 · 4 comments

Comments

@goto1134
Copy link
Contributor

goto1134 commented Jun 22, 2016

I'm using JNR and trying to call to __stdcall function. I've already tried to load library with stdcall() convention:

mTemplateApi = LibraryLoader.create(FPTemplateAPI.class).stdcall().load("FPTemplateAPI");

And tried to annotate method with @StdCall.

public interface FPTemplateAP  
{
    @StdCall
    Pointer CreateTemplateImage(@In ByteBuffer aTemplate,
                                @Out IntByReference aWidth,
                                @Out IntByReference aHeight,
                                @In boolean aColor);

}

As result I get the following error when I try to call to method:

Exception in thread "main" java.lang.UnsatisfiedLinkError: The operation completed successfully.

at jnr.ffi.provider.jffi.AsmRuntime.newUnsatisifiedLinkError(AsmRuntime.java:40)

UPD: I made another dll that has method, that delegates to this one with __stdcall methods, and it works fine. But still need solution for my problem.

@headius
Copy link
Member

headius commented Sep 26, 2016

Is this still an issue?

@goto1134
Copy link
Contributor Author

@headius I will test this on free time

@goto1134
Copy link
Contributor Author

still does not work

@headius
Copy link
Member

headius commented Jul 9, 2020

Without a reproducible case this is hard to fix. If you can provide a sample repository with stdcall C code and related jnr-ffi code that doesn't work, we can fix it quickly.

@headius headius closed this as completed Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants