ホーム › Graphics.Dwm › DwmTetherContact
DwmTetherContact
関数タッチ接触点をテザリング(係留)する。
シグネチャ
// dwmapi.dll
#include <windows.h>
HRESULT DwmTetherContact(
DWORD dwPointerID,
BOOL fEnable,
POINT ptTether
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| dwPointerID | DWORD | in |
| fEnable | BOOL | in |
| ptTether | POINT | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// dwmapi.dll
#include <windows.h>
HRESULT DwmTetherContact(
DWORD dwPointerID,
BOOL fEnable,
POINT ptTether
);[DllImport("dwmapi.dll", ExactSpelling = true)]
static extern int DwmTetherContact(
uint dwPointerID, // DWORD
bool fEnable, // BOOL
POINT ptTether // POINT
);<DllImport("dwmapi.dll", ExactSpelling:=True)>
Public Shared Function DwmTetherContact(
dwPointerID As UInteger, ' DWORD
fEnable As Boolean, ' BOOL
ptTether As POINT ' POINT
) As Integer
End Function' dwPointerID : DWORD
' fEnable : BOOL
' ptTether : POINT
Declare PtrSafe Function DwmTetherContact Lib "dwmapi" ( _
ByVal dwPointerID As Long, _
ByVal fEnable As Long, _
ByVal ptTether As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DwmTetherContact = ctypes.windll.dwmapi.DwmTetherContact
DwmTetherContact.restype = ctypes.c_int
DwmTetherContact.argtypes = [
wintypes.DWORD, # dwPointerID : DWORD
wintypes.BOOL, # fEnable : BOOL
POINT, # ptTether : POINT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dwmapi.dll')
DwmTetherContact = Fiddle::Function.new(
lib['DwmTetherContact'],
[
-Fiddle::TYPE_INT, # dwPointerID : DWORD
Fiddle::TYPE_INT, # fEnable : BOOL
Fiddle::TYPE_VOIDP, # ptTether : POINT
],
Fiddle::TYPE_INT)#[link(name = "dwmapi")]
extern "system" {
fn DwmTetherContact(
dwPointerID: u32, // DWORD
fEnable: i32, // BOOL
ptTether: POINT // POINT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("dwmapi.dll")]
public static extern int DwmTetherContact(uint dwPointerID, bool fEnable, POINT ptTether);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dwmapi_DwmTetherContact' -Namespace Win32 -PassThru
# $api::DwmTetherContact(dwPointerID, fEnable, ptTether)#uselib "dwmapi.dll"
#func global DwmTetherContact "DwmTetherContact" sptr, sptr, sptr
; DwmTetherContact dwPointerID, fEnable, ptTether ; 戻り値は stat
; dwPointerID : DWORD -> "sptr"
; fEnable : BOOL -> "sptr"
; ptTether : POINT -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "dwmapi.dll"
#cfunc global DwmTetherContact "DwmTetherContact" int, int, int
; res = DwmTetherContact(dwPointerID, fEnable, ptTether)
; dwPointerID : DWORD -> "int"
; fEnable : BOOL -> "int"
; ptTether : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。; HRESULT DwmTetherContact(DWORD dwPointerID, BOOL fEnable, POINT ptTether)
#uselib "dwmapi.dll"
#cfunc global DwmTetherContact "DwmTetherContact" int, int, int
; res = DwmTetherContact(dwPointerID, fEnable, ptTether)
; dwPointerID : DWORD -> "int"
; fEnable : BOOL -> "int"
; ptTether : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dwmapi = windows.NewLazySystemDLL("dwmapi.dll")
procDwmTetherContact = dwmapi.NewProc("DwmTetherContact")
)
// dwPointerID (DWORD), fEnable (BOOL), ptTether (POINT)
r1, _, err := procDwmTetherContact.Call(
uintptr(dwPointerID),
uintptr(fEnable),
uintptr(ptTether),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DwmTetherContact(
dwPointerID: DWORD; // DWORD
fEnable: BOOL; // BOOL
ptTether: POINT // POINT
): Integer; stdcall;
external 'dwmapi.dll' name 'DwmTetherContact';result := DllCall("dwmapi\DwmTetherContact"
, "UInt", dwPointerID ; DWORD
, "Int", fEnable ; BOOL
, "Ptr", ptTether ; POINT
, "Int") ; return: HRESULT●DwmTetherContact(dwPointerID, fEnable, ptTether) = DLL("dwmapi.dll", "int DwmTetherContact(dword, bool, void*)")
# 呼び出し: DwmTetherContact(dwPointerID, fEnable, ptTether)
# dwPointerID : DWORD -> "dword"
# fEnable : BOOL -> "bool"
# ptTether : POINT -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。