本文整理匯總了Java中com.sun.jna.win32.StdCallLibrary類的典型用法代碼示例。如果您正苦於以下問題:Java StdCallLibrary類的具體用法?Java StdCallLibrary怎麽用?Java StdCallLibrary使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StdCallLibrary類屬於com.sun.jna.win32包,在下文中一共展示了StdCallLibrary類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convertCallback
import com.sun.jna.win32.StdCallLibrary; //導入依賴的package包/類
@Override
public Struct convertCallback(FunctionSignature functionSignature, Signatures signatures, Identifier callerLibraryName) {
Struct decl = super.convertCallback(functionSignature, signatures, callerLibraryName);
if (decl != null) {
List<Modifier> mods = functionSignature.getFunction().getModifiers();
decl.setParents(Arrays.asList((SimpleTypeRef) typeRef(
functionSignature.getFunction().hasModifier(ModifierType.__stdcall)
? StdCallLibrary.StdCallCallback.class
: result.config.runtime.callbackClass)));
}
return decl;
}
示例2: SetConsoleCtrlHandler
import com.sun.jna.win32.StdCallLibrary; //導入依賴的package包/類
/**
* Native call to the Kernel32 API to set a new Console Ctrl Handler.
*
* @return true if the handler is correctly set
* @throws java.lang.UnsatisfiedLinkError if the Kernel32 library is not loaded or if the native function is not found
* @throws java.lang.NoClassDefFoundError if the library for native calls is missing
*/
native boolean SetConsoleCtrlHandler(StdCallLibrary.StdCallCallback handler, boolean add);