ホーム › Globalization › uspoof_getCheckResultRestrictionLevel
uspoof_getCheckResultRestrictionLevel
関数検査結果から制限レベルを取得する。
シグネチャ
// icuin.dll
#include <windows.h>
URestrictionLevel uspoof_getCheckResultRestrictionLevel(
const USpoofCheckResult* checkResult,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| checkResult | USpoofCheckResult* | in |
| status | UErrorCode* | inout |
戻り値の型: URestrictionLevel
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
URestrictionLevel uspoof_getCheckResultRestrictionLevel(
const USpoofCheckResult* checkResult,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int uspoof_getCheckResultRestrictionLevel(
ref IntPtr checkResult, // USpoofCheckResult*
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uspoof_getCheckResultRestrictionLevel(
ByRef checkResult As IntPtr, ' USpoofCheckResult*
ByRef status As Integer ' UErrorCode* in/out
) As Integer
End Function' checkResult : USpoofCheckResult*
' status : UErrorCode* in/out
Declare PtrSafe Function uspoof_getCheckResultRestrictionLevel Lib "icuin" ( _
ByRef checkResult 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
uspoof_getCheckResultRestrictionLevel = ctypes.cdll.icuin.uspoof_getCheckResultRestrictionLevel
uspoof_getCheckResultRestrictionLevel.restype = ctypes.c_int
uspoof_getCheckResultRestrictionLevel.argtypes = [
ctypes.c_void_p, # checkResult : USpoofCheckResult*
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
uspoof_getCheckResultRestrictionLevel = Fiddle::Function.new(
lib['uspoof_getCheckResultRestrictionLevel'],
[
Fiddle::TYPE_VOIDP, # checkResult : USpoofCheckResult*
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_INT, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn uspoof_getCheckResultRestrictionLevel(
checkResult: *const isize, // USpoofCheckResult*
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 uspoof_getCheckResultRestrictionLevel(ref IntPtr checkResult, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uspoof_getCheckResultRestrictionLevel' -Namespace Win32 -PassThru
# $api::uspoof_getCheckResultRestrictionLevel(checkResult, status)#uselib "icuin.dll"
#func global uspoof_getCheckResultRestrictionLevel "uspoof_getCheckResultRestrictionLevel" sptr, sptr
; uspoof_getCheckResultRestrictionLevel checkResult, status ; 戻り値は stat
; checkResult : USpoofCheckResult* -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuin.dll"
#cfunc global uspoof_getCheckResultRestrictionLevel "uspoof_getCheckResultRestrictionLevel" int, int
; res = uspoof_getCheckResultRestrictionLevel(checkResult, status)
; checkResult : USpoofCheckResult* -> "int"
; status : UErrorCode* in/out -> "int"; URestrictionLevel uspoof_getCheckResultRestrictionLevel(USpoofCheckResult* checkResult, UErrorCode* status)
#uselib "icuin.dll"
#cfunc global uspoof_getCheckResultRestrictionLevel "uspoof_getCheckResultRestrictionLevel" int, int
; res = uspoof_getCheckResultRestrictionLevel(checkResult, status)
; checkResult : USpoofCheckResult* -> "int"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procuspoof_getCheckResultRestrictionLevel = icuin.NewProc("uspoof_getCheckResultRestrictionLevel")
)
// checkResult (USpoofCheckResult*), status (UErrorCode* in/out)
r1, _, err := procuspoof_getCheckResultRestrictionLevel.Call(
uintptr(checkResult),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // URestrictionLevelfunction uspoof_getCheckResultRestrictionLevel(
checkResult: Pointer; // USpoofCheckResult*
status: Pointer // UErrorCode* in/out
): Integer; cdecl;
external 'icuin.dll' name 'uspoof_getCheckResultRestrictionLevel';result := DllCall("icuin\uspoof_getCheckResultRestrictionLevel"
, "Ptr", checkResult ; USpoofCheckResult*
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Int") ; return: URestrictionLevel●uspoof_getCheckResultRestrictionLevel(checkResult, status) = DLL("icuin.dll", "int uspoof_getCheckResultRestrictionLevel(void*, void*)")
# 呼び出し: uspoof_getCheckResultRestrictionLevel(checkResult, status)
# checkResult : USpoofCheckResult* -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。