ホーム › Globalization › uregex_refreshUText
uregex_refreshUText
関数検索対象UTextを移動後の参照で更新する。
シグネチャ
// icuin.dll
#include <windows.h>
void uregex_refreshUText(
URegularExpression* regexp,
UText* text,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| regexp | URegularExpression* | inout |
| text | UText* | inout |
| status | UErrorCode* | inout |
戻り値の型: void
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
void uregex_refreshUText(
URegularExpression* regexp,
UText* text,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uregex_refreshUText(
ref IntPtr regexp, // URegularExpression* in/out
IntPtr text, // UText* in/out
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uregex_refreshUText(
ByRef regexp As IntPtr, ' URegularExpression* in/out
text As IntPtr, ' UText* in/out
ByRef status As Integer ' UErrorCode* in/out
)
End Sub' regexp : URegularExpression* in/out
' text : UText* in/out
' status : UErrorCode* in/out
Declare PtrSafe Sub uregex_refreshUText Lib "icuin" ( _
ByRef regexp 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
uregex_refreshUText = ctypes.cdll.icuin.uregex_refreshUText
uregex_refreshUText.restype = None
uregex_refreshUText.argtypes = [
ctypes.c_void_p, # regexp : URegularExpression* 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('icuin.dll')
uregex_refreshUText = Fiddle::Function.new(
lib['uregex_refreshUText'],
[
Fiddle::TYPE_VOIDP, # regexp : URegularExpression* in/out
Fiddle::TYPE_VOIDP, # text : UText* in/out
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn uregex_refreshUText(
regexp: *mut isize, // URegularExpression* 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("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uregex_refreshUText(ref IntPtr regexp, IntPtr text, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uregex_refreshUText' -Namespace Win32 -PassThru
# $api::uregex_refreshUText(regexp, text, status)#uselib "icuin.dll"
#func global uregex_refreshUText "uregex_refreshUText" sptr, sptr, sptr
; uregex_refreshUText regexp, varptr(text), status
; regexp : URegularExpression* in/out -> "sptr"
; text : UText* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"出力引数:
#uselib "icuin.dll" #func global uregex_refreshUText "uregex_refreshUText" int, var, int ; uregex_refreshUText regexp, text, status ; regexp : URegularExpression* in/out -> "int" ; text : UText* in/out -> "var" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icuin.dll" #func global uregex_refreshUText "uregex_refreshUText" int, sptr, int ; uregex_refreshUText regexp, varptr(text), status ; regexp : URegularExpression* in/out -> "int" ; text : UText* in/out -> "sptr" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void uregex_refreshUText(URegularExpression* regexp, UText* text, UErrorCode* status) #uselib "icuin.dll" #func global uregex_refreshUText "uregex_refreshUText" int, var, int ; uregex_refreshUText regexp, text, status ; regexp : URegularExpression* in/out -> "int" ; text : UText* in/out -> "var" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void uregex_refreshUText(URegularExpression* regexp, UText* text, UErrorCode* status) #uselib "icuin.dll" #func global uregex_refreshUText "uregex_refreshUText" int, intptr, int ; uregex_refreshUText regexp, varptr(text), status ; regexp : URegularExpression* in/out -> "int" ; text : UText* in/out -> "intptr" ; status : UErrorCode* in/out -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procuregex_refreshUText = icuin.NewProc("uregex_refreshUText")
)
// regexp (URegularExpression* in/out), text (UText* in/out), status (UErrorCode* in/out)
r1, _, err := procuregex_refreshUText.Call(
uintptr(regexp),
uintptr(text),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure uregex_refreshUText(
regexp: Pointer; // URegularExpression* in/out
text: Pointer; // UText* in/out
status: Pointer // UErrorCode* in/out
); cdecl;
external 'icuin.dll' name 'uregex_refreshUText';result := DllCall("icuin\uregex_refreshUText"
, "Ptr", regexp ; URegularExpression* in/out
, "Ptr", text ; UText* in/out
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Int") ; return: void●uregex_refreshUText(regexp, text, status) = DLL("icuin.dll", "int uregex_refreshUText(void*, void*, void*)")
# 呼び出し: uregex_refreshUText(regexp, text, status)
# regexp : URegularExpression* 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`,…) を使用。