here is the groovy code:
import com.sun.jna.*; def lib = NativeLibrary.getInstance("mylib") def helloWorld = lib.getFunction( "MYLIB_helloWorld" ) /* if args do this Object[] args = new Object[2]; args[0] = "arg1" args[1] = "arg2" */ helloWorld.invokeVoid(null)then run with
groovy -cp jna.jar:. -Djna.nosys=true helloworld.groovyfor more invoke options see http://jna.java.net/javadoc/com/sun/jna/Function.html
No comments:
Post a Comment