Win32 API 日本語リファレンス
ホームUI.Accessibility › AccNotifyTouchInteraction

AccNotifyTouchInteraction

関数
支援技術によるタッチ操作の発生をシステムに通知する。
DLLOLEACC.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// OLEACC.dll
#include <windows.h>

HRESULT AccNotifyTouchInteraction(
    HWND hwndApp,
    HWND hwndTarget,
    POINT ptTarget
);

パラメーター

名前方向
hwndAppHWNDin
hwndTargetHWNDin
ptTargetPOINTin

戻り値の型: HRESULT

各言語での呼び出し定義

// OLEACC.dll
#include <windows.h>

HRESULT AccNotifyTouchInteraction(
    HWND hwndApp,
    HWND hwndTarget,
    POINT ptTarget
);
[DllImport("OLEACC.dll", ExactSpelling = true)]
static extern int AccNotifyTouchInteraction(
    IntPtr hwndApp,   // HWND
    IntPtr hwndTarget,   // HWND
    POINT ptTarget   // POINT
);
<DllImport("OLEACC.dll", ExactSpelling:=True)>
Public Shared Function AccNotifyTouchInteraction(
    hwndApp As IntPtr,   ' HWND
    hwndTarget As IntPtr,   ' HWND
    ptTarget As POINT   ' POINT
) As Integer
End Function
' hwndApp : HWND
' hwndTarget : HWND
' ptTarget : POINT
Declare PtrSafe Function AccNotifyTouchInteraction Lib "oleacc" ( _
    ByVal hwndApp As LongPtr, _
    ByVal hwndTarget As LongPtr, _
    ByVal ptTarget As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

AccNotifyTouchInteraction = ctypes.windll.oleacc.AccNotifyTouchInteraction
AccNotifyTouchInteraction.restype = ctypes.c_int
AccNotifyTouchInteraction.argtypes = [
    wintypes.HANDLE,  # hwndApp : HWND
    wintypes.HANDLE,  # hwndTarget : HWND
    POINT,  # ptTarget : POINT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('OLEACC.dll')
AccNotifyTouchInteraction = Fiddle::Function.new(
  lib['AccNotifyTouchInteraction'],
  [
    Fiddle::TYPE_VOIDP,  # hwndApp : HWND
    Fiddle::TYPE_VOIDP,  # hwndTarget : HWND
    Fiddle::TYPE_VOIDP,  # ptTarget : POINT
  ],
  Fiddle::TYPE_INT)
#[link(name = "oleacc")]
extern "system" {
    fn AccNotifyTouchInteraction(
        hwndApp: *mut core::ffi::c_void,  // HWND
        hwndTarget: *mut core::ffi::c_void,  // HWND
        ptTarget: POINT  // POINT
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("OLEACC.dll")]
public static extern int AccNotifyTouchInteraction(IntPtr hwndApp, IntPtr hwndTarget, POINT ptTarget);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OLEACC_AccNotifyTouchInteraction' -Namespace Win32 -PassThru
# $api::AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget)
#uselib "OLEACC.dll"
#func global AccNotifyTouchInteraction "AccNotifyTouchInteraction" sptr, sptr, sptr
; AccNotifyTouchInteraction hwndApp, hwndTarget, ptTarget   ; 戻り値は stat
; hwndApp : HWND -> "sptr"
; hwndTarget : HWND -> "sptr"
; ptTarget : POINT -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "OLEACC.dll"
#cfunc global AccNotifyTouchInteraction "AccNotifyTouchInteraction" sptr, sptr, int
; res = AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget)
; hwndApp : HWND -> "sptr"
; hwndTarget : HWND -> "sptr"
; ptTarget : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; HRESULT AccNotifyTouchInteraction(HWND hwndApp, HWND hwndTarget, POINT ptTarget)
#uselib "OLEACC.dll"
#cfunc global AccNotifyTouchInteraction "AccNotifyTouchInteraction" intptr, intptr, int
; res = AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget)
; hwndApp : HWND -> "intptr"
; hwndTarget : HWND -> "intptr"
; ptTarget : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	oleacc = windows.NewLazySystemDLL("OLEACC.dll")
	procAccNotifyTouchInteraction = oleacc.NewProc("AccNotifyTouchInteraction")
)

// hwndApp (HWND), hwndTarget (HWND), ptTarget (POINT)
r1, _, err := procAccNotifyTouchInteraction.Call(
	uintptr(hwndApp),
	uintptr(hwndTarget),
	uintptr(ptTarget),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function AccNotifyTouchInteraction(
  hwndApp: THandle;   // HWND
  hwndTarget: THandle;   // HWND
  ptTarget: POINT   // POINT
): Integer; stdcall;
  external 'OLEACC.dll' name 'AccNotifyTouchInteraction';
result := DllCall("OLEACC\AccNotifyTouchInteraction"
    , "Ptr", hwndApp   ; HWND
    , "Ptr", hwndTarget   ; HWND
    , "Ptr", ptTarget   ; POINT
    , "Int")   ; return: HRESULT
●AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget) = DLL("OLEACC.dll", "int AccNotifyTouchInteraction(void*, void*, void*)")
# 呼び出し: AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget)
# hwndApp : HWND -> "void*"
# hwndTarget : HWND -> "void*"
# ptTarget : POINT -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。