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

uset_containsAll

関数
USetが別のUSetを完全に包含するかを判定する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

CHAR uset_containsAll(
    const USet* set1,
    const USet* set2
);

パラメーター

名前方向
set1USet*in
set2USet*in

戻り値の型: CHAR

各言語での呼び出し定義

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

CHAR uset_containsAll(
    const USet* set1,
    const USet* set2
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte uset_containsAll(
    ref IntPtr set1,   // USet*
    ref IntPtr set2   // USet*
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uset_containsAll(
    ByRef set1 As IntPtr,   ' USet*
    ByRef set2 As IntPtr   ' USet*
) As SByte
End Function
' set1 : USet*
' set2 : USet*
Declare PtrSafe Function uset_containsAll Lib "icuuc" ( _
    ByRef set1 As LongPtr, _
    ByRef set2 As LongPtr) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uset_containsAll = ctypes.cdll.icuuc.uset_containsAll
uset_containsAll.restype = ctypes.c_byte
uset_containsAll.argtypes = [
    ctypes.c_void_p,  # set1 : USet*
    ctypes.c_void_p,  # set2 : USet*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuuc.dll')
uset_containsAll = Fiddle::Function.new(
  lib['uset_containsAll'],
  [
    Fiddle::TYPE_VOIDP,  # set1 : USet*
    Fiddle::TYPE_VOIDP,  # set2 : USet*
  ],
  Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn uset_containsAll(
        set1: *const isize,  // USet*
        set2: *const isize  // USet*
    ) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte uset_containsAll(ref IntPtr set1, ref IntPtr set2);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_uset_containsAll' -Namespace Win32 -PassThru
# $api::uset_containsAll(set1, set2)
#uselib "icuuc.dll"
#func global uset_containsAll "uset_containsAll" sptr, sptr
; uset_containsAll set1, set2   ; 戻り値は stat
; set1 : USet* -> "sptr"
; set2 : USet* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icuuc.dll"
#cfunc global uset_containsAll "uset_containsAll" int, int
; res = uset_containsAll(set1, set2)
; set1 : USet* -> "int"
; set2 : USet* -> "int"
; CHAR uset_containsAll(USet* set1, USet* set2)
#uselib "icuuc.dll"
#cfunc global uset_containsAll "uset_containsAll" int, int
; res = uset_containsAll(set1, set2)
; set1 : USet* -> "int"
; set2 : USet* -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procuset_containsAll = icuuc.NewProc("uset_containsAll")
)

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