com.sun.jna.Function.checkCallingConvention()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(257)

本文整理了Java中com.sun.jna.Function.checkCallingConvention()方法的一些代码示例,展示了Function.checkCallingConvention()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Function.checkCallingConvention()方法的具体详情如下:
包路径:com.sun.jna.Function
类名称:Function
方法名:checkCallingConvention

Function.checkCallingConvention介绍

暂无

代码示例

代码示例来源:origin: net.java.dev.jna/jna

/**
 * Create a new <code>Function</code> that is linked with a native
 * function that follows the given calling convention.
 *
 * <p>The allocated instance represents a pointer to the given
 * function address, called with the given calling
 * convention.
 *
 * @param  functionAddress
 *                 Address of the native function
 * @param  callFlags
 *                 Function <a href="#callflags">call flags</a>
 * @param  encoding
 *                 Encoding for conversion between Java and native strings.
 */
Function(Pointer functionAddress, int callFlags, String encoding) {
  checkCallingConvention(callFlags & MASK_CC);
  if (functionAddress == null
    || functionAddress.peer == 0) {
    throw new NullPointerException("Function address may not be null");
  }
  this.functionName = functionAddress.toString();
  this.callFlags = callFlags;
  this.peer = functionAddress.peer;
  this.options = Collections.EMPTY_MAP;
  this.encoding = encoding != null
    ? encoding : Native.getDefaultStringEncoding();
}

代码示例来源:origin: net.java.dev.jna/jna

checkCallingConvention(callFlags & MASK_CC);
if (functionName == null) {
  throw new NullPointerException("Function name must not be null");

代码示例来源:origin: org.elasticsearch/jna

/**
 * Create a new <code>Function</code> that is linked with a native
 * function that follows the given calling convention.
 *
 * <p>The allocated instance represents a pointer to the given
 * function address, called with the given calling
 * convention.
 *
 * @param  functionAddress
 *                 Address of the native function
 * @param  callFlags
 *                 Function <a href="#callflags">call flags</a>
 * @param  encoding
 *                 Encoding for conversion between Java and native strings.
 */
Function(Pointer functionAddress, int callFlags, String encoding) {
  checkCallingConvention(callFlags & MASK_CC);
  if (functionAddress == null
    || functionAddress.peer == 0) {
    throw new NullPointerException("Function address may not be null");
  }
  this.functionName = functionAddress.toString();
  this.callFlags = callFlags;
  this.peer = functionAddress.peer;
  this.options = Collections.EMPTY_MAP;
  this.encoding = encoding != null
    ? encoding : Native.getDefaultStringEncoding();
}

代码示例来源:origin: org.elasticsearch/jna

checkCallingConvention(callFlags & MASK_CC);
if (functionName == null) {
  throw new NullPointerException("Function name must not be null");

相关文章