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

umutablecptrie_clone

関数
可変コードポイントトライを複製する。
DLLicu.dll呼出規約cdecl

シグネチャ

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

UMutableCPTrie* umutablecptrie_clone(
    const UMutableCPTrie* other,
    UErrorCode* pErrorCode
);

パラメーター

名前方向
otherUMutableCPTrie*in
pErrorCodeUErrorCode*inout

戻り値の型: UMutableCPTrie*

各言語での呼び出し定義

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

UMutableCPTrie* umutablecptrie_clone(
    const UMutableCPTrie* other,
    UErrorCode* pErrorCode
);
[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr umutablecptrie_clone(
    ref IntPtr other,   // UMutableCPTrie*
    ref int pErrorCode   // UErrorCode* in/out
);
<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function umutablecptrie_clone(
    ByRef other As IntPtr,   ' UMutableCPTrie*
    ByRef pErrorCode As Integer   ' UErrorCode* in/out
) As IntPtr
End Function
' other : UMutableCPTrie*
' pErrorCode : UErrorCode* in/out
Declare PtrSafe Function umutablecptrie_clone Lib "icu" ( _
    ByRef other As LongPtr, _
    ByRef pErrorCode As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

umutablecptrie_clone = ctypes.cdll.icu.umutablecptrie_clone
umutablecptrie_clone.restype = ctypes.c_void_p
umutablecptrie_clone.argtypes = [
    ctypes.c_void_p,  # other : UMutableCPTrie*
    ctypes.c_void_p,  # pErrorCode : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procumutablecptrie_clone = icu.NewProc("umutablecptrie_clone")
)

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