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