ホーム › System.WindowsProgramming › WinWatchGetClipList
WinWatchGetClipList
関数監視中ウィンドウのクリップ領域リストを取得する。
シグネチャ
// DCIMAN32.dll
#include <windows.h>
DWORD WinWatchGetClipList(
HWINWATCH hWW,
RECT* prc,
DWORD size,
RGNDATA* prd
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWW | HWINWATCH | in |
| prc | RECT* | inout |
| size | DWORD | in |
| prd | RGNDATA* | inout |
戻り値の型: DWORD
各言語での呼び出し定義
// DCIMAN32.dll
#include <windows.h>
DWORD WinWatchGetClipList(
HWINWATCH hWW,
RECT* prc,
DWORD size,
RGNDATA* prd
);[DllImport("DCIMAN32.dll", ExactSpelling = true)]
static extern uint WinWatchGetClipList(
IntPtr hWW, // HWINWATCH
IntPtr prc, // RECT* in/out
uint size, // DWORD
IntPtr prd // RGNDATA* in/out
);<DllImport("DCIMAN32.dll", ExactSpelling:=True)>
Public Shared Function WinWatchGetClipList(
hWW As IntPtr, ' HWINWATCH
prc As IntPtr, ' RECT* in/out
size As UInteger, ' DWORD
prd As IntPtr ' RGNDATA* in/out
) As UInteger
End Function' hWW : HWINWATCH
' prc : RECT* in/out
' size : DWORD
' prd : RGNDATA* in/out
Declare PtrSafe Function WinWatchGetClipList Lib "dciman32" ( _
ByVal hWW As LongPtr, _
ByVal prc As LongPtr, _
ByVal size As Long, _
ByVal prd As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WinWatchGetClipList = ctypes.windll.dciman32.WinWatchGetClipList
WinWatchGetClipList.restype = wintypes.DWORD
WinWatchGetClipList.argtypes = [
wintypes.HANDLE, # hWW : HWINWATCH
ctypes.c_void_p, # prc : RECT* in/out
wintypes.DWORD, # size : DWORD
ctypes.c_void_p, # prd : RGNDATA* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('DCIMAN32.dll')
WinWatchGetClipList = Fiddle::Function.new(
lib['WinWatchGetClipList'],
[
Fiddle::TYPE_VOIDP, # hWW : HWINWATCH
Fiddle::TYPE_VOIDP, # prc : RECT* in/out
-Fiddle::TYPE_INT, # size : DWORD
Fiddle::TYPE_VOIDP, # prd : RGNDATA* in/out
],
-Fiddle::TYPE_INT)#[link(name = "dciman32")]
extern "system" {
fn WinWatchGetClipList(
hWW: *mut core::ffi::c_void, // HWINWATCH
prc: *mut RECT, // RECT* in/out
size: u32, // DWORD
prd: *mut RGNDATA // RGNDATA* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("DCIMAN32.dll")]
public static extern uint WinWatchGetClipList(IntPtr hWW, IntPtr prc, uint size, IntPtr prd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'DCIMAN32_WinWatchGetClipList' -Namespace Win32 -PassThru
# $api::WinWatchGetClipList(hWW, prc, size, prd)#uselib "DCIMAN32.dll"
#func global WinWatchGetClipList "WinWatchGetClipList" sptr, sptr, sptr, sptr
; WinWatchGetClipList hWW, varptr(prc), size, varptr(prd) ; 戻り値は stat
; hWW : HWINWATCH -> "sptr"
; prc : RECT* in/out -> "sptr"
; size : DWORD -> "sptr"
; prd : RGNDATA* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "DCIMAN32.dll" #cfunc global WinWatchGetClipList "WinWatchGetClipList" sptr, var, int, var ; res = WinWatchGetClipList(hWW, prc, size, prd) ; hWW : HWINWATCH -> "sptr" ; prc : RECT* in/out -> "var" ; size : DWORD -> "int" ; prd : RGNDATA* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "DCIMAN32.dll" #cfunc global WinWatchGetClipList "WinWatchGetClipList" sptr, sptr, int, sptr ; res = WinWatchGetClipList(hWW, varptr(prc), size, varptr(prd)) ; hWW : HWINWATCH -> "sptr" ; prc : RECT* in/out -> "sptr" ; size : DWORD -> "int" ; prd : RGNDATA* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD WinWatchGetClipList(HWINWATCH hWW, RECT* prc, DWORD size, RGNDATA* prd) #uselib "DCIMAN32.dll" #cfunc global WinWatchGetClipList "WinWatchGetClipList" intptr, var, int, var ; res = WinWatchGetClipList(hWW, prc, size, prd) ; hWW : HWINWATCH -> "intptr" ; prc : RECT* in/out -> "var" ; size : DWORD -> "int" ; prd : RGNDATA* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD WinWatchGetClipList(HWINWATCH hWW, RECT* prc, DWORD size, RGNDATA* prd) #uselib "DCIMAN32.dll" #cfunc global WinWatchGetClipList "WinWatchGetClipList" intptr, intptr, int, intptr ; res = WinWatchGetClipList(hWW, varptr(prc), size, varptr(prd)) ; hWW : HWINWATCH -> "intptr" ; prc : RECT* in/out -> "intptr" ; size : DWORD -> "int" ; prd : RGNDATA* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dciman32 = windows.NewLazySystemDLL("DCIMAN32.dll")
procWinWatchGetClipList = dciman32.NewProc("WinWatchGetClipList")
)
// hWW (HWINWATCH), prc (RECT* in/out), size (DWORD), prd (RGNDATA* in/out)
r1, _, err := procWinWatchGetClipList.Call(
uintptr(hWW),
uintptr(prc),
uintptr(size),
uintptr(prd),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction WinWatchGetClipList(
hWW: THandle; // HWINWATCH
prc: Pointer; // RECT* in/out
size: DWORD; // DWORD
prd: Pointer // RGNDATA* in/out
): DWORD; stdcall;
external 'DCIMAN32.dll' name 'WinWatchGetClipList';result := DllCall("DCIMAN32\WinWatchGetClipList"
, "Ptr", hWW ; HWINWATCH
, "Ptr", prc ; RECT* in/out
, "UInt", size ; DWORD
, "Ptr", prd ; RGNDATA* in/out
, "UInt") ; return: DWORD●WinWatchGetClipList(hWW, prc, size, prd) = DLL("DCIMAN32.dll", "dword WinWatchGetClipList(void*, void*, dword, void*)")
# 呼び出し: WinWatchGetClipList(hWW, prc, size, prd)
# hWW : HWINWATCH -> "void*"
# prc : RECT* in/out -> "void*"
# size : DWORD -> "dword"
# prd : RGNDATA* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。