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