ホーム › Globalization › uspoof_setAllowedChars
uspoof_setAllowedChars
関数許可する文字集合を設定する。
シグネチャ
// icuin.dll
#include <windows.h>
void uspoof_setAllowedChars(
USpoofChecker* sc,
const USet* chars,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| sc | USpoofChecker* | inout | 対象のUSpoofCheckerへのポインター。 |
| chars | USet* | in | 許可する文字集合を表すUSetへのポインター。 |
| status | UErrorCode* | inout | ICUのエラーコードを入出力するUErrorCodeへのポインター。 |
戻り値の型: void
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
void uspoof_setAllowedChars(
USpoofChecker* sc,
const USet* chars,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uspoof_setAllowedChars(
ref IntPtr sc, // USpoofChecker* in/out
ref IntPtr chars, // USet*
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uspoof_setAllowedChars(
ByRef sc As IntPtr, ' USpoofChecker* in/out
ByRef chars As IntPtr, ' USet*
ByRef status As Integer ' UErrorCode* in/out
)
End Sub' sc : USpoofChecker* in/out
' chars : USet*
' status : UErrorCode* in/out
Declare PtrSafe Sub uspoof_setAllowedChars Lib "icuin" ( _
ByRef sc As LongPtr, _
ByRef chars As LongPtr, _
ByRef status As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
uspoof_setAllowedChars = ctypes.cdll.icuin.uspoof_setAllowedChars
uspoof_setAllowedChars.restype = None
uspoof_setAllowedChars.argtypes = [
ctypes.c_void_p, # sc : USpoofChecker* in/out
ctypes.c_void_p, # chars : USet*
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
uspoof_setAllowedChars = Fiddle::Function.new(
lib['uspoof_setAllowedChars'],
[
Fiddle::TYPE_VOIDP, # sc : USpoofChecker* in/out
Fiddle::TYPE_VOIDP, # chars : USet*
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn uspoof_setAllowedChars(
sc: *mut isize, // USpoofChecker* in/out
chars: *const isize, // USet*
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_setAllowedChars(ref IntPtr sc, ref IntPtr chars, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uspoof_setAllowedChars' -Namespace Win32 -PassThru
# $api::uspoof_setAllowedChars(sc, chars, status)#uselib "icuin.dll"
#func global uspoof_setAllowedChars "uspoof_setAllowedChars" sptr, sptr, sptr
; uspoof_setAllowedChars sc, chars, status
; sc : USpoofChecker* in/out -> "sptr"
; chars : USet* -> "sptr"
; status : UErrorCode* in/out -> "sptr"#uselib "icuin.dll"
#func global uspoof_setAllowedChars "uspoof_setAllowedChars" int, int, int
; uspoof_setAllowedChars sc, chars, status
; sc : USpoofChecker* in/out -> "int"
; chars : USet* -> "int"
; status : UErrorCode* in/out -> "int"; void uspoof_setAllowedChars(USpoofChecker* sc, USet* chars, UErrorCode* status)
#uselib "icuin.dll"
#func global uspoof_setAllowedChars "uspoof_setAllowedChars" int, int, int
; uspoof_setAllowedChars sc, chars, status
; sc : USpoofChecker* in/out -> "int"
; chars : USet* -> "int"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procuspoof_setAllowedChars = icuin.NewProc("uspoof_setAllowedChars")
)
// sc (USpoofChecker* in/out), chars (USet*), status (UErrorCode* in/out)
r1, _, err := procuspoof_setAllowedChars.Call(
uintptr(sc),
uintptr(chars),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure uspoof_setAllowedChars(
sc: Pointer; // USpoofChecker* in/out
chars: Pointer; // USet*
status: Pointer // UErrorCode* in/out
); cdecl;
external 'icuin.dll' name 'uspoof_setAllowedChars';result := DllCall("icuin\uspoof_setAllowedChars"
, "Ptr", sc ; USpoofChecker* in/out
, "Ptr", chars ; USet*
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Int") ; return: void●uspoof_setAllowedChars(sc, chars, status) = DLL("icuin.dll", "int uspoof_setAllowedChars(void*, void*, void*)")
# 呼び出し: uspoof_setAllowedChars(sc, chars, status)
# sc : USpoofChecker* in/out -> "void*"
# chars : USet* -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。