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