Win32 API 日本語リファレンス
ホームGlobalization › uset_removeRange

uset_removeRange

関数
指定範囲のコードポイントをUSetから削除する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

// icuuc.dll
#include <windows.h>

void uset_removeRange(
    USet* set,
    INT start,
    INT end
);

パラメーター

名前方向
setUSet*inout
startINTin
endINTin

戻り値の型: void

各言語での呼び出し定義

// icuuc.dll
#include <windows.h>

void uset_removeRange(
    USet* set,
    INT start,
    INT end
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uset_removeRange(
    ref IntPtr set,   // USet* in/out
    int start,   // INT
    int end   // INT
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uset_removeRange(
    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_removeRange Lib "icuuc" ( _
    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_removeRange = ctypes.cdll.icuuc.uset_removeRange
uset_removeRange.restype = None
uset_removeRange.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('icuuc.dll')
uset_removeRange = Fiddle::Function.new(
  lib['uset_removeRange'],
  [
    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 = "icuuc")]
extern "C" {
    fn uset_removeRange(
        set: *mut isize,  // USet* in/out
        start: i32,  // INT
        end: i32  // INT
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uset_removeRange(ref IntPtr set, int start, int end);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_uset_removeRange' -Namespace Win32 -PassThru
# $api::uset_removeRange(set, start, end)
#uselib "icuuc.dll"
#func global uset_removeRange "uset_removeRange" sptr, sptr, sptr
; uset_removeRange set, start, end
; set : USet* in/out -> "sptr"
; start : INT -> "sptr"
; end : INT -> "sptr"
#uselib "icuuc.dll"
#func global uset_removeRange "uset_removeRange" int, int, int
; uset_removeRange set, start, end
; set : USet* in/out -> "int"
; start : INT -> "int"
; end : INT -> "int"
; void uset_removeRange(USet* set, INT start, INT end)
#uselib "icuuc.dll"
#func global uset_removeRange "uset_removeRange" int, int, int
; uset_removeRange set, start, end
; set : USet* in/out -> "int"
; start : INT -> "int"
; end : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procuset_removeRange = icuuc.NewProc("uset_removeRange")
)

// set (USet* in/out), start (INT), end (INT)
r1, _, err := procuset_removeRange.Call(
	uintptr(set),
	uintptr(start),
	uintptr(end),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure uset_removeRange(
  set: Pointer;   // USet* in/out
  start: Integer;   // INT
  end: Integer   // INT
); cdecl;
  external 'icuuc.dll' name 'uset_removeRange';
result := DllCall("icuuc\uset_removeRange"
    , "Ptr", set   ; USet* in/out
    , "Int", start   ; INT
    , "Int", end   ; INT
    , "Cdecl Int")   ; return: void
●uset_removeRange(set, start, end) = DLL("icuuc.dll", "int uset_removeRange(void*, int, int)")
# 呼び出し: uset_removeRange(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`,…) を使用。