ホーム › UI.InteractionContext › DestroyInteractionContext
DestroyInteractionContext
関数インタラクションコンテキストを破棄しリソースを解放する。
シグネチャ
// NInput.dll
#include <windows.h>
HRESULT DestroyInteractionContext(
HINTERACTIONCONTEXT interactionContext
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| interactionContext | HINTERACTIONCONTEXT | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// NInput.dll
#include <windows.h>
HRESULT DestroyInteractionContext(
HINTERACTIONCONTEXT interactionContext
);[DllImport("NInput.dll", ExactSpelling = true)]
static extern int DestroyInteractionContext(
IntPtr interactionContext // HINTERACTIONCONTEXT
);<DllImport("NInput.dll", ExactSpelling:=True)>
Public Shared Function DestroyInteractionContext(
interactionContext As IntPtr ' HINTERACTIONCONTEXT
) As Integer
End Function' interactionContext : HINTERACTIONCONTEXT
Declare PtrSafe Function DestroyInteractionContext Lib "ninput" ( _
ByVal interactionContext As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DestroyInteractionContext = ctypes.windll.ninput.DestroyInteractionContext
DestroyInteractionContext.restype = ctypes.c_int
DestroyInteractionContext.argtypes = [
wintypes.HANDLE, # interactionContext : HINTERACTIONCONTEXT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('NInput.dll')
DestroyInteractionContext = Fiddle::Function.new(
lib['DestroyInteractionContext'],
[
Fiddle::TYPE_VOIDP, # interactionContext : HINTERACTIONCONTEXT
],
Fiddle::TYPE_INT)#[link(name = "ninput")]
extern "system" {
fn DestroyInteractionContext(
interactionContext: *mut core::ffi::c_void // HINTERACTIONCONTEXT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("NInput.dll")]
public static extern int DestroyInteractionContext(IntPtr interactionContext);
"@
$api = Add-Type -MemberDefinition $sig -Name 'NInput_DestroyInteractionContext' -Namespace Win32 -PassThru
# $api::DestroyInteractionContext(interactionContext)#uselib "NInput.dll"
#func global DestroyInteractionContext "DestroyInteractionContext" sptr
; DestroyInteractionContext interactionContext ; 戻り値は stat
; interactionContext : HINTERACTIONCONTEXT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "NInput.dll"
#cfunc global DestroyInteractionContext "DestroyInteractionContext" sptr
; res = DestroyInteractionContext(interactionContext)
; interactionContext : HINTERACTIONCONTEXT -> "sptr"; HRESULT DestroyInteractionContext(HINTERACTIONCONTEXT interactionContext)
#uselib "NInput.dll"
#cfunc global DestroyInteractionContext "DestroyInteractionContext" intptr
; res = DestroyInteractionContext(interactionContext)
; interactionContext : HINTERACTIONCONTEXT -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ninput = windows.NewLazySystemDLL("NInput.dll")
procDestroyInteractionContext = ninput.NewProc("DestroyInteractionContext")
)
// interactionContext (HINTERACTIONCONTEXT)
r1, _, err := procDestroyInteractionContext.Call(
uintptr(interactionContext),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DestroyInteractionContext(
interactionContext: THandle // HINTERACTIONCONTEXT
): Integer; stdcall;
external 'NInput.dll' name 'DestroyInteractionContext';result := DllCall("NInput\DestroyInteractionContext"
, "Ptr", interactionContext ; HINTERACTIONCONTEXT
, "Int") ; return: HRESULT●DestroyInteractionContext(interactionContext) = DLL("NInput.dll", "int DestroyInteractionContext(void*)")
# 呼び出し: DestroyInteractionContext(interactionContext)
# interactionContext : HINTERACTIONCONTEXT -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。