ホーム › Globalization › ubrk_next
ubrk_next
関数分割イテレータを次の境界位置へ進める。
シグネチャ
// icuuc.dll
#include <windows.h>
INT ubrk_next(
UBreakIterator* bi
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| bi | UBreakIterator* | inout |
戻り値の型: INT
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
INT ubrk_next(
UBreakIterator* bi
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int ubrk_next(
ref IntPtr bi // UBreakIterator* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ubrk_next(
ByRef bi As IntPtr ' UBreakIterator* in/out
) As Integer
End Function' bi : UBreakIterator* in/out
Declare PtrSafe Function ubrk_next Lib "icuuc" ( _
ByRef bi As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ubrk_next = ctypes.cdll.icuuc.ubrk_next
ubrk_next.restype = ctypes.c_int
ubrk_next.argtypes = [
ctypes.c_void_p, # bi : UBreakIterator* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
ubrk_next = Fiddle::Function.new(
lib['ubrk_next'],
[
Fiddle::TYPE_VOIDP, # bi : UBreakIterator* in/out
],
Fiddle::TYPE_INT, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn ubrk_next(
bi: *mut isize // UBreakIterator* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int ubrk_next(ref IntPtr bi);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ubrk_next' -Namespace Win32 -PassThru
# $api::ubrk_next(bi)#uselib "icuuc.dll"
#func global ubrk_next "ubrk_next" sptr
; ubrk_next bi ; 戻り値は stat
; bi : UBreakIterator* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuuc.dll"
#cfunc global ubrk_next "ubrk_next" int
; res = ubrk_next(bi)
; bi : UBreakIterator* in/out -> "int"; INT ubrk_next(UBreakIterator* bi)
#uselib "icuuc.dll"
#cfunc global ubrk_next "ubrk_next" int
; res = ubrk_next(bi)
; bi : UBreakIterator* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procubrk_next = icuuc.NewProc("ubrk_next")
)
// bi (UBreakIterator* in/out)
r1, _, err := procubrk_next.Call(
uintptr(bi),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction ubrk_next(
bi: Pointer // UBreakIterator* in/out
): Integer; cdecl;
external 'icuuc.dll' name 'ubrk_next';result := DllCall("icuuc\ubrk_next"
, "Ptr", bi ; UBreakIterator* in/out
, "Cdecl Int") ; return: INT●ubrk_next(bi) = DLL("icuuc.dll", "int ubrk_next(void*)")
# 呼び出し: ubrk_next(bi)
# bi : UBreakIterator* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。