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

u_getBinaryPropertySet

関数
指定バイナリプロパティを持つ文字の集合を取得する。
DLLicu.dll呼出規約cdecl

シグネチャ

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

USet* u_getBinaryPropertySet(
    UProperty property,
    UErrorCode* pErrorCode
);

パラメーター

名前方向
propertyUPropertyin
pErrorCodeUErrorCode*inout

戻り値の型: USet*

各言語での呼び出し定義

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

USet* u_getBinaryPropertySet(
    UProperty property,
    UErrorCode* pErrorCode
);
[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr u_getBinaryPropertySet(
    int property,   // UProperty
    ref int pErrorCode   // UErrorCode* in/out
);
<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function u_getBinaryPropertySet(
    [property] As Integer,   ' UProperty
    ByRef pErrorCode As Integer   ' UErrorCode* in/out
) As IntPtr
End Function
' property : UProperty
' pErrorCode : UErrorCode* in/out
Declare PtrSafe Function u_getBinaryPropertySet Lib "icu" ( _
    ByVal property As Long, _
    ByRef pErrorCode As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

u_getBinaryPropertySet = ctypes.cdll.icu.u_getBinaryPropertySet
u_getBinaryPropertySet.restype = ctypes.c_void_p
u_getBinaryPropertySet.argtypes = [
    ctypes.c_int,  # property : UProperty
    ctypes.c_void_p,  # pErrorCode : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procu_getBinaryPropertySet = icu.NewProc("u_getBinaryPropertySet")
)

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