ホーム › Globalization › umutablecptrie_setRange
umutablecptrie_setRange
関数可変トライに指定範囲の値をまとめて設定する。
シグネチャ
// icu.dll
#include <windows.h>
void umutablecptrie_setRange(
UMutableCPTrie* trie,
INT start,
INT end,
DWORD value,
UErrorCode* pErrorCode
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| trie | UMutableCPTrie* | inout |
| start | INT | in |
| end | INT | in |
| value | DWORD | in |
| pErrorCode | UErrorCode* | inout |
戻り値の型: void
各言語での呼び出し定義
// icu.dll
#include <windows.h>
void umutablecptrie_setRange(
UMutableCPTrie* trie,
INT start,
INT end,
DWORD value,
UErrorCode* pErrorCode
);[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void umutablecptrie_setRange(
ref IntPtr trie, // UMutableCPTrie* in/out
int start, // INT
int end, // INT
uint value, // DWORD
ref int pErrorCode // UErrorCode* in/out
);<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub umutablecptrie_setRange(
ByRef trie As IntPtr, ' UMutableCPTrie* in/out
start As Integer, ' INT
[end] As Integer, ' INT
value As UInteger, ' DWORD
ByRef pErrorCode As Integer ' UErrorCode* in/out
)
End Sub' trie : UMutableCPTrie* in/out
' start : INT
' end : INT
' value : DWORD
' pErrorCode : UErrorCode* in/out
Declare PtrSafe Sub umutablecptrie_setRange Lib "icu" ( _
ByRef trie As LongPtr, _
ByVal start As Long, _
ByVal end As Long, _
ByVal value As Long, _
ByRef pErrorCode As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
umutablecptrie_setRange = ctypes.cdll.icu.umutablecptrie_setRange
umutablecptrie_setRange.restype = None
umutablecptrie_setRange.argtypes = [
ctypes.c_void_p, # trie : UMutableCPTrie* in/out
ctypes.c_int, # start : INT
ctypes.c_int, # end : INT
wintypes.DWORD, # value : DWORD
ctypes.c_void_p, # pErrorCode : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icu.dll')
umutablecptrie_setRange = Fiddle::Function.new(
lib['umutablecptrie_setRange'],
[
Fiddle::TYPE_VOIDP, # trie : UMutableCPTrie* in/out
Fiddle::TYPE_INT, # start : INT
Fiddle::TYPE_INT, # end : INT
-Fiddle::TYPE_INT, # value : DWORD
Fiddle::TYPE_VOIDP, # pErrorCode : UErrorCode* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icu")]
extern "C" {
fn umutablecptrie_setRange(
trie: *mut isize, // UMutableCPTrie* in/out
start: i32, // INT
end: i32, // INT
value: u32, // DWORD
pErrorCode: *mut i32 // UErrorCode* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void umutablecptrie_setRange(ref IntPtr trie, int start, int end, uint value, ref int pErrorCode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_umutablecptrie_setRange' -Namespace Win32 -PassThru
# $api::umutablecptrie_setRange(trie, start, end, value, pErrorCode)#uselib "icu.dll"
#func global umutablecptrie_setRange "umutablecptrie_setRange" sptr, sptr, sptr, sptr, sptr
; umutablecptrie_setRange trie, start, end, value, pErrorCode
; trie : UMutableCPTrie* in/out -> "sptr"
; start : INT -> "sptr"
; end : INT -> "sptr"
; value : DWORD -> "sptr"
; pErrorCode : UErrorCode* in/out -> "sptr"#uselib "icu.dll"
#func global umutablecptrie_setRange "umutablecptrie_setRange" int, int, int, int, int
; umutablecptrie_setRange trie, start, end, value, pErrorCode
; trie : UMutableCPTrie* in/out -> "int"
; start : INT -> "int"
; end : INT -> "int"
; value : DWORD -> "int"
; pErrorCode : UErrorCode* in/out -> "int"; void umutablecptrie_setRange(UMutableCPTrie* trie, INT start, INT end, DWORD value, UErrorCode* pErrorCode)
#uselib "icu.dll"
#func global umutablecptrie_setRange "umutablecptrie_setRange" int, int, int, int, int
; umutablecptrie_setRange trie, start, end, value, pErrorCode
; trie : UMutableCPTrie* in/out -> "int"
; start : INT -> "int"
; end : INT -> "int"
; value : DWORD -> "int"
; pErrorCode : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icu = windows.NewLazySystemDLL("icu.dll")
procumutablecptrie_setRange = icu.NewProc("umutablecptrie_setRange")
)
// trie (UMutableCPTrie* in/out), start (INT), end (INT), value (DWORD), pErrorCode (UErrorCode* in/out)
r1, _, err := procumutablecptrie_setRange.Call(
uintptr(trie),
uintptr(start),
uintptr(end),
uintptr(value),
uintptr(pErrorCode),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure umutablecptrie_setRange(
trie: Pointer; // UMutableCPTrie* in/out
start: Integer; // INT
end: Integer; // INT
value: DWORD; // DWORD
pErrorCode: Pointer // UErrorCode* in/out
); cdecl;
external 'icu.dll' name 'umutablecptrie_setRange';result := DllCall("icu\umutablecptrie_setRange"
, "Ptr", trie ; UMutableCPTrie* in/out
, "Int", start ; INT
, "Int", end ; INT
, "UInt", value ; DWORD
, "Ptr", pErrorCode ; UErrorCode* in/out
, "Cdecl Int") ; return: void●umutablecptrie_setRange(trie, start, end, value, pErrorCode) = DLL("icu.dll", "int umutablecptrie_setRange(void*, int, int, dword, void*)")
# 呼び出し: umutablecptrie_setRange(trie, start, end, value, pErrorCode)
# trie : UMutableCPTrie* in/out -> "void*"
# start : INT -> "int"
# end : INT -> "int"
# value : DWORD -> "dword"
# pErrorCode : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。