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