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

UiaTextRangeRelease

関数
UIAテキスト範囲オブジェクトのハンドルを解放する。
DLLUIAutomationCore.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

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

BOOL UiaTextRangeRelease(
    HUIATEXTRANGE hobj
);

パラメーター

名前方向
hobjHUIATEXTRANGEin

戻り値の型: BOOL

各言語での呼び出し定義

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

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

UiaTextRangeRelease = ctypes.windll.uiautomationcore.UiaTextRangeRelease
UiaTextRangeRelease.restype = wintypes.BOOL
UiaTextRangeRelease.argtypes = [
    wintypes.HANDLE,  # hobj : HUIATEXTRANGE
]
require 'fiddle'
require 'fiddle/import'

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

var (
	uiautomationcore = windows.NewLazySystemDLL("UIAutomationCore.dll")
	procUiaTextRangeRelease = uiautomationcore.NewProc("UiaTextRangeRelease")
)

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