JNI経由でパラメータをメインに渡すにはどうすればよいですか?
現在、次のように DLL をロードします。
class SharedLibrary {
native void GetBuffer(ByteBuffer Buffer);;
SharedLibrary(String[] exec_args) {
String path = new File(exec_args[0]).getAbsolutePath();
System.load(path); //Load My DLL. I want to Pass this DLL some arguments.
ByteBuffer Foo = ByteBuffer.allocateDirect(.....);
GetBuffer(Foo);
}
}
DLL 引数を渡すにはどうすればよいですか? 複数の引数を渡す必要があります。