Win32 API 日本語リファレンス
ホームGlobalization › umutablecptrie_get

umutablecptrie_get

関数
可変コードポイントトライから指定値を取得する。
DLLicu.dll呼出規約cdecl

シグネチャ

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

DWORD umutablecptrie_get(
    const UMutableCPTrie* trie,
    INT c
);

パラメーター

名前方向
trieUMutableCPTrie*in
cINTin

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD umutablecptrie_get(
    const UMutableCPTrie* trie,
    INT c
);
[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern uint umutablecptrie_get(
    ref IntPtr trie,   // UMutableCPTrie*
    int c   // INT
);
<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function umutablecptrie_get(
    ByRef trie As IntPtr,   ' UMutableCPTrie*
    c As Integer   ' INT
) As UInteger
End Function
' trie : UMutableCPTrie*
' c : INT
Declare PtrSafe Function umutablecptrie_get Lib "icu" ( _
    ByRef 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

umutablecptrie_get = ctypes.cdll.icu.umutablecptrie_get
umutablecptrie_get.restype = wintypes.DWORD
umutablecptrie_get.argtypes = [
    ctypes.c_void_p,  # trie : UMutableCPTrie*
    ctypes.c_int,  # c : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icu.dll')
umutablecptrie_get = Fiddle::Function.new(
  lib['umutablecptrie_get'],
  [
    Fiddle::TYPE_VOIDP,  # trie : UMutableCPTrie*
    Fiddle::TYPE_INT,  # c : INT
  ],
  -Fiddle::TYPE_INT, Fiddle::Function::CDECL)
#[link(name = "icu")]
extern "C" {
    fn umutablecptrie_get(
        trie: *const isize,  // UMutableCPTrie*
        c: i32  // INT
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern uint umutablecptrie_get(ref IntPtr trie, int c);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_umutablecptrie_get' -Namespace Win32 -PassThru
# $api::umutablecptrie_get(trie, c)
#uselib "icu.dll"
#func global umutablecptrie_get "umutablecptrie_get" sptr, sptr
; umutablecptrie_get trie, c   ; 戻り値は stat
; trie : UMutableCPTrie* -> "sptr"
; c : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icu.dll"
#cfunc global umutablecptrie_get "umutablecptrie_get" int, int
; res = umutablecptrie_get(trie, c)
; trie : UMutableCPTrie* -> "int"
; c : INT -> "int"
; DWORD umutablecptrie_get(UMutableCPTrie* trie, INT c)
#uselib "icu.dll"
#cfunc global umutablecptrie_get "umutablecptrie_get" int, int
; res = umutablecptrie_get(trie, c)
; trie : UMutableCPTrie* -> "int"
; c : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procumutablecptrie_get = icu.NewProc("umutablecptrie_get")
)

// trie (UMutableCPTrie*), c (INT)
r1, _, err := procumutablecptrie_get.Call(
	uintptr(trie),
	uintptr(c),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function umutablecptrie_get(
  trie: Pointer;   // UMutableCPTrie*
  c: Integer   // INT
): DWORD; cdecl;
  external 'icu.dll' name 'umutablecptrie_get';
result := DllCall("icu\umutablecptrie_get"
    , "Ptr", trie   ; UMutableCPTrie*
    , "Int", c   ; INT
    , "Cdecl UInt")   ; return: DWORD
●umutablecptrie_get(trie, c) = DLL("icu.dll", "dword umutablecptrie_get(void*, int)")
# 呼び出し: umutablecptrie_get(trie, c)
# trie : UMutableCPTrie* -> "void*"
# c : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。