ホーム › Globalization › ubrk_refreshUText
ubrk_refreshUText
関数移動した入力テキストへ分割イテレータの参照を更新する。
シグネチャ
// icuuc.dll
#include <windows.h>
void ubrk_refreshUText(
UBreakIterator* bi,
UText* text,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| bi | UBreakIterator* | inout |
| text | UText* | inout |
| status | UErrorCode* | inout |
戻り値の型: void
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
void ubrk_refreshUText(
UBreakIterator* bi,
UText* text,
UErrorCode* status
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void ubrk_refreshUText(
ref IntPtr bi, // UBreakIterator* in/out
IntPtr text, // UText* in/out
ref int status // UErrorCode* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub ubrk_refreshUText(
ByRef bi As IntPtr, ' UBreakIterator* in/out
text As IntPtr, ' UText* in/out
ByRef status As Integer ' UErrorCode* in/out
)
End Sub' bi : UBreakIterator* in/out
' text : UText* in/out
' status : UErrorCode* in/out
Declare PtrSafe Sub ubrk_refreshUText Lib "icuuc" ( _
ByRef bi As LongPtr, _
ByVal text As LongPtr, _
ByRef status As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ubrk_refreshUText = ctypes.cdll.icuuc.ubrk_refreshUText
ubrk_refreshUText.restype = None
ubrk_refreshUText.argtypes = [
ctypes.c_void_p, # bi : UBreakIterator* in/out
ctypes.c_void_p, # text : UText* in/out
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
ubrk_refreshUText = Fiddle::Function.new(
lib['ubrk_refreshUText'],
[
Fiddle::TYPE_VOIDP, # bi : UBreakIterator* in/out
Fiddle::TYPE_VOIDP, # text : UText* in/out
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn ubrk_refreshUText(
bi: *mut isize, // UBreakIterator* in/out
text: *mut UText, // UText* in/out
status: *mut i32 // UErrorCode* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void ubrk_refreshUText(ref IntPtr bi, IntPtr text, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ubrk_refreshUText' -Namespace Win32 -PassThru
# $api::ubrk_refreshUText(bi, text, status)#uselib "icuuc.dll"
#func global ubrk_refreshUText "ubrk_refreshUText" sptr, sptr, sptr
; ubrk_refreshUText bi, varptr(text), status
; bi : UBreakIterator* in/out -> "sptr"
; text : UText* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"出力引数:
#uselib "icuuc.dll" #func global ubrk_refreshUText "ubrk_refreshUText" int, var, int ; ubrk_refreshUText bi, text, status ; bi : UBreakIterator* in/out -> "int" ; text : UText* in/out -> "var" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icuuc.dll" #func global ubrk_refreshUText "ubrk_refreshUText" int, sptr, int ; ubrk_refreshUText bi, varptr(text), status ; bi : UBreakIterator* in/out -> "int" ; text : UText* in/out -> "sptr" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void ubrk_refreshUText(UBreakIterator* bi, UText* text, UErrorCode* status) #uselib "icuuc.dll" #func global ubrk_refreshUText "ubrk_refreshUText" int, var, int ; ubrk_refreshUText bi, text, status ; bi : UBreakIterator* in/out -> "int" ; text : UText* in/out -> "var" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void ubrk_refreshUText(UBreakIterator* bi, UText* text, UErrorCode* status) #uselib "icuuc.dll" #func global ubrk_refreshUText "ubrk_refreshUText" int, intptr, int ; ubrk_refreshUText bi, varptr(text), status ; bi : UBreakIterator* in/out -> "int" ; text : UText* in/out -> "intptr" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procubrk_refreshUText = icuuc.NewProc("ubrk_refreshUText")
)
// bi (UBreakIterator* in/out), text (UText* in/out), status (UErrorCode* in/out)
r1, _, err := procubrk_refreshUText.Call(
uintptr(bi),
uintptr(text),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure ubrk_refreshUText(
bi: Pointer; // UBreakIterator* in/out
text: Pointer; // UText* in/out
status: Pointer // UErrorCode* in/out
); cdecl;
external 'icuuc.dll' name 'ubrk_refreshUText';result := DllCall("icuuc\ubrk_refreshUText"
, "Ptr", bi ; UBreakIterator* in/out
, "Ptr", text ; UText* in/out
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Int") ; return: void●ubrk_refreshUText(bi, text, status) = DLL("icuuc.dll", "int ubrk_refreshUText(void*, void*, void*)")
# 呼び出し: ubrk_refreshUText(bi, text, status)
# bi : UBreakIterator* in/out -> "void*"
# text : UText* in/out -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。