Win32 API 日本語リファレンス
ホームUI.Input.Pointer › DestroySyntheticPointerDevice

DestroySyntheticPointerDevice

関数
合成ポインタデバイスを破棄する。
DLLUSER32.dll呼出規約winapi対応OSWindows 10 以降

シグネチャ

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

void DestroySyntheticPointerDevice(
    HSYNTHETICPOINTERDEVICE device
);

パラメーター

名前方向説明
deviceHSYNTHETICPOINTERDEVICEin破棄する合成ポインタデバイスのハンドルを指定する。

戻り値の型: void

各言語での呼び出し定義

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

void DestroySyntheticPointerDevice(
    HSYNTHETICPOINTERDEVICE device
);
[DllImport("USER32.dll", ExactSpelling = true)]
static extern void DestroySyntheticPointerDevice(
    IntPtr device   // HSYNTHETICPOINTERDEVICE
);
<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Sub DestroySyntheticPointerDevice(
    device As IntPtr   ' HSYNTHETICPOINTERDEVICE
)
End Sub
' device : HSYNTHETICPOINTERDEVICE
Declare PtrSafe Sub DestroySyntheticPointerDevice Lib "user32" ( _
    ByVal device As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

DestroySyntheticPointerDevice = ctypes.windll.user32.DestroySyntheticPointerDevice
DestroySyntheticPointerDevice.restype = None
DestroySyntheticPointerDevice.argtypes = [
    wintypes.HANDLE,  # device : HSYNTHETICPOINTERDEVICE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('USER32.dll')
DestroySyntheticPointerDevice = Fiddle::Function.new(
  lib['DestroySyntheticPointerDevice'],
  [
    Fiddle::TYPE_VOIDP,  # device : HSYNTHETICPOINTERDEVICE
  ],
  Fiddle::TYPE_VOID)
#[link(name = "user32")]
extern "system" {
    fn DestroySyntheticPointerDevice(
        device: *mut core::ffi::c_void  // HSYNTHETICPOINTERDEVICE
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("USER32.dll")]
public static extern void DestroySyntheticPointerDevice(IntPtr device);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_DestroySyntheticPointerDevice' -Namespace Win32 -PassThru
# $api::DestroySyntheticPointerDevice(device)
#uselib "USER32.dll"
#func global DestroySyntheticPointerDevice "DestroySyntheticPointerDevice" sptr
; DestroySyntheticPointerDevice device
; device : HSYNTHETICPOINTERDEVICE -> "sptr"
#uselib "USER32.dll"
#func global DestroySyntheticPointerDevice "DestroySyntheticPointerDevice" sptr
; DestroySyntheticPointerDevice device
; device : HSYNTHETICPOINTERDEVICE -> "sptr"
; void DestroySyntheticPointerDevice(HSYNTHETICPOINTERDEVICE device)
#uselib "USER32.dll"
#func global DestroySyntheticPointerDevice "DestroySyntheticPointerDevice" intptr
; DestroySyntheticPointerDevice device
; device : HSYNTHETICPOINTERDEVICE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	user32 = windows.NewLazySystemDLL("USER32.dll")
	procDestroySyntheticPointerDevice = user32.NewProc("DestroySyntheticPointerDevice")
)

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