本文整理了Java中com.sun.jna.Native.invokeStructure()
方法的一些代码示例,展示了Native.invokeStructure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Native.invokeStructure()
方法的具体详情如下:
包路径:com.sun.jna.Native
类名称:Native
方法名:invokeStructure
[英]Call the native function, returning a struct by value.
[中]调用本机函数,按值返回结构。
代码示例来源:origin: net.java.dev.jna/jna
/**
* Call the native function, returning a struct by value.
*
* @param function Present to prevent the GC to collect the Function object
* prematurely
* @param fp function pointer
* @param callFlags calling convention to be used
* @param args Arguments to pass to the native function
*
* @return the passed-in Structure
*/
static Structure invokeStructure(Function function, long fp, int callFlags, Object[] args,
Structure s) {
invokeStructure(function, fp, callFlags, args, s.getPointer().peer,
s.getTypeInfo().peer);
return s;
}
代码示例来源:origin: net.java.dev.jna/jna
if (Structure.ByValue.class.isAssignableFrom(returnType)) {
Structure s =
Native.invokeStructure(this, this.peer, callFlags, args,
Structure.newInstance((Class<? extends Structure>)returnType));
s.autoRead();
代码示例来源:origin: org.elasticsearch/jna
/**
* Call the native function, returning a struct by value.
*
* @param function Present to prevent the GC to collect the Function object
* prematurely
* @param fp function pointer
* @param callFlags calling convention to be used
* @param args Arguments to pass to the native function
*
* @return the passed-in Structure
*/
static Structure invokeStructure(Function function, long fp, int callFlags, Object[] args,
Structure s) {
invokeStructure(function, fp, callFlags, args, s.getPointer().peer,
s.getTypeInfo().peer);
return s;
}
代码示例来源:origin: org.elasticsearch/jna
if (Structure.ByValue.class.isAssignableFrom(returnType)) {
Structure s =
Native.invokeStructure(this, this.peer, callFlags, args,
Structure.newInstance(returnType));
s.autoRead();
内容来源于网络,如有侵权,请联系作者删除!