Win32 API 日本語リファレンス
ホームUI.Accessibility › UiaNodeRelease

UiaNodeRelease

関数
UIオートメーションノードハンドルを解放する。
DLLUIAutomationCore.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

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

BOOL UiaNodeRelease(
    HUIANODE hnode
);

パラメーター

名前方向
hnodeHUIANODEin

戻り値の型: BOOL

各言語での呼び出し定義

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

BOOL UiaNodeRelease(
    HUIANODE hnode
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("UIAutomationCore.dll", ExactSpelling = true)]
static extern bool UiaNodeRelease(
    IntPtr hnode   // HUIANODE
);
<DllImport("UIAutomationCore.dll", ExactSpelling:=True)>
Public Shared Function UiaNodeRelease(
    hnode As IntPtr   ' HUIANODE
) As Boolean
End Function
' hnode : HUIANODE
Declare PtrSafe Function UiaNodeRelease Lib "uiautomationcore" ( _
    ByVal hnode As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

UiaNodeRelease = ctypes.windll.uiautomationcore.UiaNodeRelease
UiaNodeRelease.restype = wintypes.BOOL
UiaNodeRelease.argtypes = [
    wintypes.HANDLE,  # hnode : HUIANODE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('UIAutomationCore.dll')
UiaNodeRelease = Fiddle::Function.new(
  lib['UiaNodeRelease'],
  [
    Fiddle::TYPE_VOIDP,  # hnode : HUIANODE
  ],
  Fiddle::TYPE_INT)
#[link(name = "uiautomationcore")]
extern "system" {
    fn UiaNodeRelease(
        hnode: *mut core::ffi::c_void  // HUIANODE
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("UIAutomationCore.dll")]
public static extern bool UiaNodeRelease(IntPtr hnode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UIAutomationCore_UiaNodeRelease' -Namespace Win32 -PassThru
# $api::UiaNodeRelease(hnode)
#uselib "UIAutomationCore.dll"
#func global UiaNodeRelease "UiaNodeRelease" sptr
; UiaNodeRelease hnode   ; 戻り値は stat
; hnode : HUIANODE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "UIAutomationCore.dll"
#cfunc global UiaNodeRelease "UiaNodeRelease" sptr
; res = UiaNodeRelease(hnode)
; hnode : HUIANODE -> "sptr"
; BOOL UiaNodeRelease(HUIANODE hnode)
#uselib "UIAutomationCore.dll"
#cfunc global UiaNodeRelease "UiaNodeRelease" intptr
; res = UiaNodeRelease(hnode)
; hnode : HUIANODE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	uiautomationcore = windows.NewLazySystemDLL("UIAutomationCore.dll")
	procUiaNodeRelease = uiautomationcore.NewProc("UiaNodeRelease")
)

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