ホーム › Globalization › ucptrie_getValueWidth
ucptrie_getValueWidth
関数コードポイントトライの値ビット幅を取得する。
シグネチャ
// icu.dll
#include <windows.h>
UCPTrieValueWidth ucptrie_getValueWidth(
const UCPTrie* trie
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| trie | UCPTrie* | in |
戻り値の型: UCPTrieValueWidth
各言語での呼び出し定義
// icu.dll
#include <windows.h>
UCPTrieValueWidth ucptrie_getValueWidth(
const UCPTrie* trie
);[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int ucptrie_getValueWidth(
IntPtr trie // UCPTrie*
);<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ucptrie_getValueWidth(
trie As IntPtr ' UCPTrie*
) As Integer
End Function' trie : UCPTrie*
Declare PtrSafe Function ucptrie_getValueWidth Lib "icu" ( _
ByVal trie As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ucptrie_getValueWidth = ctypes.cdll.icu.ucptrie_getValueWidth
ucptrie_getValueWidth.restype = ctypes.c_int
ucptrie_getValueWidth.argtypes = [
ctypes.c_void_p, # trie : UCPTrie*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icu.dll')
ucptrie_getValueWidth = Fiddle::Function.new(
lib['ucptrie_getValueWidth'],
[
Fiddle::TYPE_VOIDP, # trie : UCPTrie*
],
Fiddle::TYPE_INT, Fiddle::Function::CDECL)#[link(name = "icu")]
extern "C" {
fn ucptrie_getValueWidth(
trie: *const UCPTrie // UCPTrie*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int ucptrie_getValueWidth(IntPtr trie);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_ucptrie_getValueWidth' -Namespace Win32 -PassThru
# $api::ucptrie_getValueWidth(trie)#uselib "icu.dll"
#func global ucptrie_getValueWidth "ucptrie_getValueWidth" sptr
; ucptrie_getValueWidth varptr(trie) ; 戻り値は stat
; trie : UCPTrie* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "icu.dll" #cfunc global ucptrie_getValueWidth "ucptrie_getValueWidth" var ; res = ucptrie_getValueWidth(trie) ; trie : UCPTrie* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icu.dll" #cfunc global ucptrie_getValueWidth "ucptrie_getValueWidth" sptr ; res = ucptrie_getValueWidth(varptr(trie)) ; trie : UCPTrie* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; UCPTrieValueWidth ucptrie_getValueWidth(UCPTrie* trie) #uselib "icu.dll" #cfunc global ucptrie_getValueWidth "ucptrie_getValueWidth" var ; res = ucptrie_getValueWidth(trie) ; trie : UCPTrie* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; UCPTrieValueWidth ucptrie_getValueWidth(UCPTrie* trie) #uselib "icu.dll" #cfunc global ucptrie_getValueWidth "ucptrie_getValueWidth" intptr ; res = ucptrie_getValueWidth(varptr(trie)) ; trie : UCPTrie* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icu = windows.NewLazySystemDLL("icu.dll")
procucptrie_getValueWidth = icu.NewProc("ucptrie_getValueWidth")
)
// trie (UCPTrie*)
r1, _, err := procucptrie_getValueWidth.Call(
uintptr(trie),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // UCPTrieValueWidthfunction ucptrie_getValueWidth(
trie: Pointer // UCPTrie*
): Integer; cdecl;
external 'icu.dll' name 'ucptrie_getValueWidth';result := DllCall("icu\ucptrie_getValueWidth"
, "Ptr", trie ; UCPTrie*
, "Cdecl Int") ; return: UCPTrieValueWidth●ucptrie_getValueWidth(trie) = DLL("icu.dll", "int ucptrie_getValueWidth(void*)")
# 呼び出し: ucptrie_getValueWidth(trie)
# trie : UCPTrie* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。