How to deal with this two-level native access?

11 visualizações
Pular para a primeira mensagem não lida

Hank Huang

não lida,
5 de jul. de 2021, 21:40:1405/07/2021
para Java Native Access
66D0C994-BAA1-4482-BE3F-7739AF3C1106.png27408120-B005-4511-BB09-8CD424D49DAE.png

Daniel Widdis

não lida,
5 de jul. de 2021, 22:04:5705/07/2021
para jna-...@googlegroups.com

Just link directly to ApplicationServices.  It exposes the subframework.

 

This worked for me (worked meaning nothing happened, but the library did load):

 

public interface ApplicationServices extends Library {

    ApplicationServices INSTANCE = Native.load("ApplicationServices", ApplicationServices.class);

 

    void AXUIElementCreateApplication(String id);

}

 

public class Test {

    public static void main(String[] args) {

        ApplicationServices.INSTANCE.AXUIElementCreateApplication("28041");

    }

}

 

From: 'Hank Huang' via Java Native Access <jna-...@googlegroups.com>
Reply-To: <jna-...@googlegroups.com>
Date: Monday, July 5, 2021 at 6:40 PM
To: Java Native Access <jna-...@googlegroups.com>
Subject: How to deal with this two-level native access

 

--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/6c3f0aa9-a114-4f2a-acdb-09a479324e91n%40googlegroups.com.

Hank Huang

não lida,
5 de jul. de 2021, 22:34:5705/07/2021
para Java Native Access
Thank you very much, it worked for me!
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem