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