Win32 API 日本語リファレンス
ホームGlobalization › unumrf_resultGetIdentityResult

unumrf_resultGetIdentityResult

関数
範囲の両端が同一かどうかの判定結果を取得する。
DLLicu.dll呼出規約cdecl

シグネチャ

// icu.dll
#include <windows.h>

UNumberRangeIdentityResult unumrf_resultGetIdentityResult(
    const UFormattedNumberRange* uresult,
    UErrorCode* ec
);

パラメーター

名前方向説明
uresultUFormattedNumberRange*in判定対象となる整形済み数値範囲結果。両端が等しいかなどの同一性情報を保持する。
ecUErrorCode*inoutICUエラーコードの入出力ポインタ。事前にU_ZERO_ERRORへ初期化する。

戻り値の型: UNumberRangeIdentityResult

各言語での呼び出し定義

// icu.dll
#include <windows.h>

UNumberRangeIdentityResult unumrf_resultGetIdentityResult(
    const UFormattedNumberRange* uresult,
    UErrorCode* ec
);
[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int unumrf_resultGetIdentityResult(
    ref IntPtr uresult,   // UFormattedNumberRange*
    ref int ec   // UErrorCode* in/out
);
<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function unumrf_resultGetIdentityResult(
    ByRef uresult As IntPtr,   ' UFormattedNumberRange*
    ByRef ec As Integer   ' UErrorCode* in/out
) As Integer
End Function
' uresult : UFormattedNumberRange*
' ec : UErrorCode* in/out
Declare PtrSafe Function unumrf_resultGetIdentityResult Lib "icu" ( _
    ByRef uresult As LongPtr, _
    ByRef ec As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

unumrf_resultGetIdentityResult = ctypes.cdll.icu.unumrf_resultGetIdentityResult
unumrf_resultGetIdentityResult.restype = ctypes.c_int
unumrf_resultGetIdentityResult.argtypes = [
    ctypes.c_void_p,  # uresult : UFormattedNumberRange*
    ctypes.c_void_p,  # ec : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icu.dll')
unumrf_resultGetIdentityResult = Fiddle::Function.new(
  lib['unumrf_resultGetIdentityResult'],
  [
    Fiddle::TYPE_VOIDP,  # uresult : UFormattedNumberRange*
    Fiddle::TYPE_VOIDP,  # ec : UErrorCode* in/out
  ],
  Fiddle::TYPE_INT, Fiddle::Function::CDECL)
#[link(name = "icu")]
extern "C" {
    fn unumrf_resultGetIdentityResult(
        uresult: *const isize,  // UFormattedNumberRange*
        ec: *mut i32  // UErrorCode* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int unumrf_resultGetIdentityResult(ref IntPtr uresult, ref int ec);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_unumrf_resultGetIdentityResult' -Namespace Win32 -PassThru
# $api::unumrf_resultGetIdentityResult(uresult, ec)
#uselib "icu.dll"
#func global unumrf_resultGetIdentityResult "unumrf_resultGetIdentityResult" sptr, sptr
; unumrf_resultGetIdentityResult uresult, ec   ; 戻り値は stat
; uresult : UFormattedNumberRange* -> "sptr"
; ec : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icu.dll"
#cfunc global unumrf_resultGetIdentityResult "unumrf_resultGetIdentityResult" int, int
; res = unumrf_resultGetIdentityResult(uresult, ec)
; uresult : UFormattedNumberRange* -> "int"
; ec : UErrorCode* in/out -> "int"
; UNumberRangeIdentityResult unumrf_resultGetIdentityResult(UFormattedNumberRange* uresult, UErrorCode* ec)
#uselib "icu.dll"
#cfunc global unumrf_resultGetIdentityResult "unumrf_resultGetIdentityResult" int, int
; res = unumrf_resultGetIdentityResult(uresult, ec)
; uresult : UFormattedNumberRange* -> "int"
; ec : UErrorCode* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procunumrf_resultGetIdentityResult = icu.NewProc("unumrf_resultGetIdentityResult")
)

// uresult (UFormattedNumberRange*), ec (UErrorCode* in/out)
r1, _, err := procunumrf_resultGetIdentityResult.Call(
	uintptr(uresult),
	uintptr(ec),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // UNumberRangeIdentityResult
function unumrf_resultGetIdentityResult(
  uresult: Pointer;   // UFormattedNumberRange*
  ec: Pointer   // UErrorCode* in/out
): Integer; cdecl;
  external 'icu.dll' name 'unumrf_resultGetIdentityResult';
result := DllCall("icu\unumrf_resultGetIdentityResult"
    , "Ptr", uresult   ; UFormattedNumberRange*
    , "Ptr", ec   ; UErrorCode* in/out
    , "Cdecl Int")   ; return: UNumberRangeIdentityResult
●unumrf_resultGetIdentityResult(uresult, ec) = DLL("icu.dll", "int unumrf_resultGetIdentityResult(void*, void*)")
# 呼び出し: unumrf_resultGetIdentityResult(uresult, ec)
# uresult : UFormattedNumberRange* -> "void*"
# ec : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。