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