ホーム › Globalization › u_getIntPropertyMap
u_getIntPropertyMap
関数整数型プロパティのコードポイント対応マップを取得する。
シグネチャ
// icu.dll
#include <windows.h>
UCPMap* u_getIntPropertyMap(
UProperty property,
UErrorCode* pErrorCode
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| property | UProperty | in |
| pErrorCode | UErrorCode* | inout |
戻り値の型: UCPMap*
各言語での呼び出し定義
// icu.dll
#include <windows.h>
UCPMap* u_getIntPropertyMap(
UProperty property,
UErrorCode* pErrorCode
);[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr u_getIntPropertyMap(
int property, // UProperty
ref int pErrorCode // UErrorCode* in/out
);<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function u_getIntPropertyMap(
[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_getIntPropertyMap 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_getIntPropertyMap = ctypes.cdll.icu.u_getIntPropertyMap
u_getIntPropertyMap.restype = ctypes.c_void_p
u_getIntPropertyMap.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_getIntPropertyMap = Fiddle::Function.new(
lib['u_getIntPropertyMap'],
[
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_getIntPropertyMap(
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_getIntPropertyMap(int property, ref int pErrorCode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_u_getIntPropertyMap' -Namespace Win32 -PassThru
# $api::u_getIntPropertyMap(property, pErrorCode)#uselib "icu.dll"
#func global u_getIntPropertyMap "u_getIntPropertyMap" sptr, sptr
; u_getIntPropertyMap property, pErrorCode ; 戻り値は stat
; property : UProperty -> "sptr"
; pErrorCode : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icu.dll"
#cfunc global u_getIntPropertyMap "u_getIntPropertyMap" int, int
; res = u_getIntPropertyMap(property, pErrorCode)
; property : UProperty -> "int"
; pErrorCode : UErrorCode* in/out -> "int"; UCPMap* u_getIntPropertyMap(UProperty property, UErrorCode* pErrorCode)
#uselib "icu.dll"
#cfunc global u_getIntPropertyMap "u_getIntPropertyMap" int, int
; res = u_getIntPropertyMap(property, pErrorCode)
; property : UProperty -> "int"
; pErrorCode : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icu = windows.NewLazySystemDLL("icu.dll")
procu_getIntPropertyMap = icu.NewProc("u_getIntPropertyMap")
)
// property (UProperty), pErrorCode (UErrorCode* in/out)
r1, _, err := procu_getIntPropertyMap.Call(
uintptr(property),
uintptr(pErrorCode),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // UCPMap*function u_getIntPropertyMap(
property: Integer; // UProperty
pErrorCode: Pointer // UErrorCode* in/out
): Pointer; cdecl;
external 'icu.dll' name 'u_getIntPropertyMap';result := DllCall("icu\u_getIntPropertyMap"
, "Int", property ; UProperty
, "Ptr", pErrorCode ; UErrorCode* in/out
, "Cdecl Ptr") ; return: UCPMap*●u_getIntPropertyMap(property, pErrorCode) = DLL("icu.dll", "void* u_getIntPropertyMap(int, void*)")
# 呼び出し: u_getIntPropertyMap(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`,…) を使用。