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