本文整理汇总了Java中com.sun.jna.ptr.NativeLongByReference.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java NativeLongByReference.getValue方法的具体用法?Java NativeLongByReference.getValue怎么用?Java NativeLongByReference.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jna.ptr.NativeLongByReference
的用法示例。
在下文中一共展示了NativeLongByReference.getValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Token
import com.sun.jna.ptr.NativeLongByReference; //导入方法依赖的package包/类
Token(NativeLong slotId) throws Pkcs11CallerException {
RtPkcs11 pkcs11 = RtPkcs11Library.getInstance();
synchronized (pkcs11) {
mId = slotId;
initTokenInfo();
NativeLongByReference session = new NativeLongByReference();
NativeLong rv = RtPkcs11Library.getInstance().C_OpenSession(mId,
Pkcs11Constants.CKF_SERIAL_SESSION, null, null, session);
if (!rv.equals(Pkcs11Constants.CKR_OK)) throw Pkcs11Exception.exceptionWithCode(rv);
mSession = session.getValue();
try {
initCertificatesList(pkcs11);
} catch (Pkcs11CallerException exception) {
try {
close();
} catch (Pkcs11CallerException exception2) {
}
throw exception;
}
}
}
示例2: MidiClient
import com.sun.jna.ptr.NativeLongByReference; //导入方法依赖的package包/类
public MidiClient(final String string, final MIDINotifyProc notifyProc)
throws CoreMidiException {
final ID name = Foundation.cfString(string);
final NativeLongByReference temp = new NativeLongByReference();
final int midiClientCreate =
CoreMidiLibrary.INSTANCE.MIDIClientCreate(name, notifyProc,
null, temp);
if (midiClientCreate != 0) {
throw new CoreMidiException(midiClientCreate);
}
LOGGER.info("MidiClientRef: " + temp.getValue().longValue());
midiClientRef = temp.getValue();
}
示例3: outputPortCreate
import com.sun.jna.ptr.NativeLongByReference; //导入方法依赖的package包/类
public MidiOutputPort outputPortCreate(final String string)
throws CoreMidiException {
final NativeLongByReference temp = new NativeLongByReference();
final ID name = Foundation.cfString(string);
final int midiOutputPortCreate =
CoreMidiLibrary.INSTANCE.MIDIOutputPortCreate(midiClientRef,
name, temp);
if (midiOutputPortCreate != 0) {
throw new CoreMidiException(midiOutputPortCreate);
}
return new MidiOutputPort(temp.getValue());
}
示例4: inputPortCreate
import com.sun.jna.ptr.NativeLongByReference; //导入方法依赖的package包/类
public MidiInputPort inputPortCreate(final String name,
final MIDIReadProc readProc) throws CoreMidiException {
final NativeLongByReference temp = new NativeLongByReference();
final int midiInputPortCreate =
CoreMidiLibrary.INSTANCE.MIDIInputPortCreate(midiClientRef,
Foundation.cfString(name), readProc, null, temp);
if (midiInputPortCreate != 0) {
throw new CoreMidiException(midiInputPortCreate);
}
return new MidiInputPort(temp.getValue());
}