ホーム › Globalization › umutablecptrie_close
umutablecptrie_close
関数可変コードポイントトライを閉じて解放する。
シグネチャ
// icu.dll
#include <windows.h>
void umutablecptrie_close(
UMutableCPTrie* trie
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| trie | UMutableCPTrie* | inout | 解放対象の可変トライへのポインタ。NULL可。 |
戻り値の型: void
各言語での呼び出し定義
// icu.dll
#include <windows.h>
void umutablecptrie_close(
UMutableCPTrie* trie
);[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void umutablecptrie_close(
ref IntPtr trie // UMutableCPTrie* in/out
);<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub umutablecptrie_close(
ByRef trie As IntPtr ' UMutableCPTrie* in/out
)
End Sub' trie : UMutableCPTrie* in/out
Declare PtrSafe Sub umutablecptrie_close Lib "icu" ( _
ByRef trie As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
umutablecptrie_close = ctypes.cdll.icu.umutablecptrie_close
umutablecptrie_close.restype = None
umutablecptrie_close.argtypes = [
ctypes.c_void_p, # trie : UMutableCPTrie* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icu.dll')
umutablecptrie_close = Fiddle::Function.new(
lib['umutablecptrie_close'],
[
Fiddle::TYPE_VOIDP, # trie : UMutableCPTrie* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icu")]
extern "C" {
fn umutablecptrie_close(
trie: *mut isize // UMutableCPTrie* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void umutablecptrie_close(ref IntPtr trie);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_umutablecptrie_close' -Namespace Win32 -PassThru
# $api::umutablecptrie_close(trie)#uselib "icu.dll"
#func global umutablecptrie_close "umutablecptrie_close" sptr
; umutablecptrie_close varptr(trie)
; trie : UMutableCPTrie* in/out -> "sptr"出力引数:
#uselib "icu.dll" #func global umutablecptrie_close "umutablecptrie_close" var ; umutablecptrie_close trie ; trie : UMutableCPTrie* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icu.dll" #func global umutablecptrie_close "umutablecptrie_close" sptr ; umutablecptrie_close varptr(trie) ; trie : UMutableCPTrie* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void umutablecptrie_close(UMutableCPTrie* trie) #uselib "icu.dll" #func global umutablecptrie_close "umutablecptrie_close" var ; umutablecptrie_close trie ; trie : UMutableCPTrie* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void umutablecptrie_close(UMutableCPTrie* trie) #uselib "icu.dll" #func global umutablecptrie_close "umutablecptrie_close" intptr ; umutablecptrie_close varptr(trie) ; trie : UMutableCPTrie* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icu = windows.NewLazySystemDLL("icu.dll")
procumutablecptrie_close = icu.NewProc("umutablecptrie_close")
)
// trie (UMutableCPTrie* in/out)
r1, _, err := procumutablecptrie_close.Call(
uintptr(trie),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure umutablecptrie_close(
trie: Pointer // UMutableCPTrie* in/out
); cdecl;
external 'icu.dll' name 'umutablecptrie_close';result := DllCall("icu\umutablecptrie_close"
, "Ptr", trie ; UMutableCPTrie* in/out
, "Cdecl Int") ; return: void●umutablecptrie_close(trie) = DLL("icu.dll", "int umutablecptrie_close(void*)")
# 呼び出し: umutablecptrie_close(trie)
# trie : UMutableCPTrie* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。const std = @import("std");
extern "icu" fn umutablecptrie_close(
trie: [*c]isize // UMutableCPTrie* in/out
) callconv(.c) void;proc umutablecptrie_close(
trie: ptr int # UMutableCPTrie* in/out
) {.importc: "umutablecptrie_close", cdecl, dynlib: "icu.dll".}pragma(lib, "icu");
extern(C)
void umutablecptrie_close(
ptrdiff_t* trie // UMutableCPTrie* in/out
);ccall((:umutablecptrie_close, "icu.dll"), Cvoid,
(Ptr{Int},),
trie)
# trie : UMutableCPTrie* in/out -> Ptr{Int}local ffi = require("ffi")
ffi.cdef[[
void umutablecptrie_close(
intptr_t* trie);
]]
local icu = ffi.load("icu")
-- icu.umutablecptrie_close(trie)
-- trie : UMutableCPTrie* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('icu.dll');
const umutablecptrie_close = lib.func('__cdecl', 'umutablecptrie_close', 'void', ['intptr_t *']);
// umutablecptrie_close(trie)
// trie : UMutableCPTrie* in/out -> 'intptr_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("icu.dll", {
umutablecptrie_close: { parameters: ["pointer"], result: "void" },
});
// lib.symbols.umutablecptrie_close(trie)
// trie : UMutableCPTrie* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
void umutablecptrie_close(
intptr_t* trie);
C, "icu.dll");
// $ffi->umutablecptrie_close(trie);
// trie : UMutableCPTrie* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Icu extends Library {
Icu INSTANCE = Native.load("icu", Icu.class);
void umutablecptrie_close(
LongByReference trie // UMutableCPTrie* in/out
);
}@[Link("icu")]
lib Libicu
fun umutablecptrie_close = umutablecptrie_close(
trie : LibC::SSizeT* # UMutableCPTrie* in/out
) : Void
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef umutablecptrie_closeNative = Void Function(Pointer<IntPtr>);
typedef umutablecptrie_closeDart = void Function(Pointer<IntPtr>);
final umutablecptrie_close = DynamicLibrary.open('icu.dll')
.lookupFunction<umutablecptrie_closeNative, umutablecptrie_closeDart>('umutablecptrie_close');
// trie : UMutableCPTrie* in/out -> Pointer<IntPtr>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
procedure umutablecptrie_close(
trie: Pointer // UMutableCPTrie* in/out
); cdecl;
external 'icu.dll' name 'umutablecptrie_close';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import ccall safe "umutablecptrie_close"
c_umutablecptrie_close :: Ptr CIntPtr -> IO ()
-- trie : UMutableCPTrie* in/out -> Ptr CIntPtr
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let umutablecptrie_close =
foreign "umutablecptrie_close"
((ptr intptr_t) @-> returning void)
(* trie : UMutableCPTrie* in/out -> (ptr intptr_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library icu (t "icu.dll"))
(cffi:use-foreign-library icu)
(cffi:defcfun ("umutablecptrie_close" umutablecptrie-close :convention :cdecl) :void
(trie :pointer)) ; UMutableCPTrie* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $umutablecptrie_close = Win32::API::More->new('icu',
'void umutablecptrie_close(LPVOID trie)');
# my $ret = $umutablecptrie_close->Call($trie);
# trie : UMutableCPTrie* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。