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