ホーム › UI.WindowsAndMessaging › ConvertToInterceptWindow
ConvertToInterceptWindow
関数トップレベルウィンドウをインターセプト用に変換する。
シグネチャ
// USER32.dll
#include <windows.h>
BOOL ConvertToInterceptWindow(
HWND topLevelWindow
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| topLevelWindow | HWND | in |
戻り値の型: BOOL
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
BOOL ConvertToInterceptWindow(
HWND topLevelWindow
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll", ExactSpelling = true)]
static extern bool ConvertToInterceptWindow(
IntPtr topLevelWindow // HWND
);<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Function ConvertToInterceptWindow(
topLevelWindow As IntPtr ' HWND
) As Boolean
End Function' topLevelWindow : HWND
Declare PtrSafe Function ConvertToInterceptWindow Lib "user32" ( _
ByVal topLevelWindow As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ConvertToInterceptWindow = ctypes.windll.user32.ConvertToInterceptWindow
ConvertToInterceptWindow.restype = wintypes.BOOL
ConvertToInterceptWindow.argtypes = [
wintypes.HANDLE, # topLevelWindow : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
ConvertToInterceptWindow = Fiddle::Function.new(
lib['ConvertToInterceptWindow'],
[
Fiddle::TYPE_VOIDP, # topLevelWindow : HWND
],
Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn ConvertToInterceptWindow(
topLevelWindow: *mut core::ffi::c_void // HWND
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll")]
public static extern bool ConvertToInterceptWindow(IntPtr topLevelWindow);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_ConvertToInterceptWindow' -Namespace Win32 -PassThru
# $api::ConvertToInterceptWindow(topLevelWindow)#uselib "USER32.dll"
#func global ConvertToInterceptWindow "ConvertToInterceptWindow" sptr
; ConvertToInterceptWindow topLevelWindow ; 戻り値は stat
; topLevelWindow : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global ConvertToInterceptWindow "ConvertToInterceptWindow" sptr
; res = ConvertToInterceptWindow(topLevelWindow)
; topLevelWindow : HWND -> "sptr"; BOOL ConvertToInterceptWindow(HWND topLevelWindow)
#uselib "USER32.dll"
#cfunc global ConvertToInterceptWindow "ConvertToInterceptWindow" intptr
; res = ConvertToInterceptWindow(topLevelWindow)
; topLevelWindow : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procConvertToInterceptWindow = user32.NewProc("ConvertToInterceptWindow")
)
// topLevelWindow (HWND)
r1, _, err := procConvertToInterceptWindow.Call(
uintptr(topLevelWindow),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction ConvertToInterceptWindow(
topLevelWindow: THandle // HWND
): BOOL; stdcall;
external 'USER32.dll' name 'ConvertToInterceptWindow';result := DllCall("USER32\ConvertToInterceptWindow"
, "Ptr", topLevelWindow ; HWND
, "Int") ; return: BOOL●ConvertToInterceptWindow(topLevelWindow) = DLL("USER32.dll", "bool ConvertToInterceptWindow(void*)")
# 呼び出し: ConvertToInterceptWindow(topLevelWindow)
# topLevelWindow : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。