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

uset_complementAllCodePoints

関数
文字列中の各コードポイントの含有を反転する。
DLLicu.dll呼出規約cdecl

シグネチャ

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

void uset_complementAllCodePoints(
    USet* set,
    const WORD* str,
    INT length
);

パラメーター

名前方向
setUSet*inout
strWORD*in
lengthINTin

戻り値の型: void

各言語での呼び出し定義

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

void uset_complementAllCodePoints(
    USet* set,
    const WORD* str,
    INT length
);
[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uset_complementAllCodePoints(
    ref IntPtr set,   // USet* in/out
    ref ushort str,   // WORD*
    int length   // INT
);
<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uset_complementAllCodePoints(
    ByRef [set] As IntPtr,   ' USet* in/out
    ByRef str As UShort,   ' WORD*
    length As Integer   ' INT
)
End Sub
' set : USet* in/out
' str : WORD*
' length : INT
Declare PtrSafe Sub uset_complementAllCodePoints Lib "icu" ( _
    ByRef set As LongPtr, _
    ByRef str As Integer, _
    ByVal length As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uset_complementAllCodePoints = ctypes.cdll.icu.uset_complementAllCodePoints
uset_complementAllCodePoints.restype = None
uset_complementAllCodePoints.argtypes = [
    ctypes.c_void_p,  # set : USet* in/out
    ctypes.POINTER(ctypes.c_ushort),  # str : WORD*
    ctypes.c_int,  # length : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icu.dll')
uset_complementAllCodePoints = Fiddle::Function.new(
  lib['uset_complementAllCodePoints'],
  [
    Fiddle::TYPE_VOIDP,  # set : USet* in/out
    Fiddle::TYPE_VOIDP,  # str : WORD*
    Fiddle::TYPE_INT,  # length : INT
  ],
  Fiddle::TYPE_VOID, Fiddle::Function::CDECL)
#[link(name = "icu")]
extern "C" {
    fn uset_complementAllCodePoints(
        set: *mut isize,  // USet* in/out
        str: *const u16,  // WORD*
        length: i32  // INT
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uset_complementAllCodePoints(ref IntPtr set, ref ushort str, int length);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_uset_complementAllCodePoints' -Namespace Win32 -PassThru
# $api::uset_complementAllCodePoints(set, str, length)
#uselib "icu.dll"
#func global uset_complementAllCodePoints "uset_complementAllCodePoints" sptr, sptr, sptr
; uset_complementAllCodePoints set, varptr(str), length
; set : USet* in/out -> "sptr"
; str : WORD* -> "sptr"
; length : INT -> "sptr"
出力引数:
#uselib "icu.dll"
#func global uset_complementAllCodePoints "uset_complementAllCodePoints" int, var, int
; uset_complementAllCodePoints set, str, length
; set : USet* in/out -> "int"
; str : WORD* -> "var"
; length : INT -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void uset_complementAllCodePoints(USet* set, WORD* str, INT length)
#uselib "icu.dll"
#func global uset_complementAllCodePoints "uset_complementAllCodePoints" int, var, int
; uset_complementAllCodePoints set, str, length
; set : USet* in/out -> "int"
; str : WORD* -> "var"
; length : INT -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procuset_complementAllCodePoints = icu.NewProc("uset_complementAllCodePoints")
)

// set (USet* in/out), str (WORD*), length (INT)
r1, _, err := procuset_complementAllCodePoints.Call(
	uintptr(set),
	uintptr(str),
	uintptr(length),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure uset_complementAllCodePoints(
  set: Pointer;   // USet* in/out
  str: Pointer;   // WORD*
  length: Integer   // INT
); cdecl;
  external 'icu.dll' name 'uset_complementAllCodePoints';
result := DllCall("icu\uset_complementAllCodePoints"
    , "Ptr", set   ; USet* in/out
    , "Ptr", str   ; WORD*
    , "Int", length   ; INT
    , "Cdecl Int")   ; return: void
●uset_complementAllCodePoints(set, str, length) = DLL("icu.dll", "int uset_complementAllCodePoints(void*, void*, int)")
# 呼び出し: uset_complementAllCodePoints(set, str, length)
# set : USet* in/out -> "void*"
# str : WORD* -> "void*"
# length : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。