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

uset_complementAll

関数
別のUSetとの対称差を対象のUSetに設定する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

void uset_complementAll(
    USet* set,
    const USet* complement
);

パラメーター

名前方向説明
setUSet*inout変更される対象のUnicodeセット。
complementUSet*in補集合演算の相手となるUnicodeセット。setとの対称差集合が求められる。

戻り値の型: void

各言語での呼び出し定義

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

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

uset_complementAll = ctypes.cdll.icuuc.uset_complementAll
uset_complementAll.restype = None
uset_complementAll.argtypes = [
    ctypes.c_void_p,  # set : USet* in/out
    ctypes.c_void_p,  # complement : USet*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procuset_complementAll = icuuc.NewProc("uset_complementAll")
)

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

extern "icuuc" fn uset_complementAll(
    set: [*c]isize, // USet* in/out
    complement: [*c]isize // USet*
) callconv(.c) void;
proc uset_complementAll(
    set: ptr int,  # USet* in/out
    complement: ptr int  # USet*
) {.importc: "uset_complementAll", cdecl, dynlib: "icuuc.dll".}
pragma(lib, "icuuc");
extern(C)
void uset_complementAll(
    ptrdiff_t* set,   // USet* in/out
    ptrdiff_t* complement   // USet*
);
ccall((:uset_complementAll, "icuuc.dll"), Cvoid,
      (Ptr{Int}, Ptr{Int}),
      set, complement)
# set : USet* in/out -> Ptr{Int}
# complement : USet* -> Ptr{Int}
local ffi = require("ffi")
ffi.cdef[[
void uset_complementAll(
    intptr_t* set,
    intptr_t* complement);
]]
local icuuc = ffi.load("icuuc")
-- icuuc.uset_complementAll(set, complement)
-- set : USet* in/out
-- complement : USet*
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('icuuc.dll');
const uset_complementAll = lib.func('__cdecl', 'uset_complementAll', 'void', ['intptr_t *', 'intptr_t *']);
// uset_complementAll(set, complement)
// set : USet* in/out -> 'intptr_t *'
// complement : USet* -> 'intptr_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("icuuc.dll", {
  uset_complementAll: { parameters: ["pointer", "pointer"], result: "void" },
});
// lib.symbols.uset_complementAll(set, complement)
// set : USet* in/out -> "pointer"
// complement : USet* -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
void uset_complementAll(
    intptr_t* set,
    intptr_t* complement);
C, "icuuc.dll");
// $ffi->uset_complementAll(set, complement);
// set : USet* in/out
// complement : USet*
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface Icuuc extends Library {
    Icuuc INSTANCE = Native.load("icuuc", Icuuc.class);
    void uset_complementAll(
        LongByReference set,   // USet* in/out
        LongByReference complement   // USet*
    );
}
@[Link("icuuc")]
lib Libicuuc
  fun uset_complementAll = uset_complementAll(
    set : LibC::SSizeT*,   # USet* in/out
    complement : LibC::SSizeT*   # USet*
  ) : Void
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef uset_complementAllNative = Void Function(Pointer<IntPtr>, Pointer<IntPtr>);
typedef uset_complementAllDart = void Function(Pointer<IntPtr>, Pointer<IntPtr>);
final uset_complementAll = DynamicLibrary.open('icuuc.dll')
    .lookupFunction<uset_complementAllNative, uset_complementAllDart>('uset_complementAll');
// set : USet* in/out -> Pointer<IntPtr>
// complement : USet* -> Pointer<IntPtr>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
procedure uset_complementAll(
  set: Pointer;   // USet* in/out
  complement: Pointer   // USet*
); cdecl;
  external 'icuuc.dll' name 'uset_complementAll';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import ccall safe "uset_complementAll"
  c_uset_complementAll :: Ptr CIntPtr -> Ptr CIntPtr -> IO ()
-- set : USet* in/out -> Ptr CIntPtr
-- complement : USet* -> Ptr CIntPtr
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let uset_complementall =
  foreign "uset_complementAll"
    ((ptr intptr_t) @-> (ptr intptr_t) @-> returning void)
(* set : USet* in/out -> (ptr intptr_t) *)
(* complement : USet* -> (ptr intptr_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library icuuc (t "icuuc.dll"))
(cffi:use-foreign-library icuuc)

(cffi:defcfun ("uset_complementAll" uset-complement-all :convention :cdecl) :void
  (set :pointer)   ; USet* in/out
  (complement :pointer))   ; USet*
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $uset_complementAll = Win32::API::More->new('icuuc',
    'void uset_complementAll(LPVOID set, LPVOID complement)');
# my $ret = $uset_complementAll->Call($set, $complement);
# set : USet* in/out -> LPVOID
# complement : USet* -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。