ホーム › Globalization › utrans_openIDs
utrans_openIDs
関数利用可能なトランスリテレータIDの列挙を取得する。
シグネチャ
// icuin.dll
#include <windows.h>
UEnumeration* utrans_openIDs(
UErrorCode* pErrorCode
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pErrorCode | UErrorCode* | inout |
戻り値の型: UEnumeration*
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
UEnumeration* utrans_openIDs(
UErrorCode* pErrorCode
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr utrans_openIDs(
ref int pErrorCode // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function utrans_openIDs(
ByRef pErrorCode As Integer ' UErrorCode* in/out
) As IntPtr
End Function' pErrorCode : UErrorCode* in/out
Declare PtrSafe Function utrans_openIDs Lib "icuin" ( _
ByRef pErrorCode As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
utrans_openIDs = ctypes.cdll.icuin.utrans_openIDs
utrans_openIDs.restype = ctypes.c_void_p
utrans_openIDs.argtypes = [
ctypes.c_void_p, # pErrorCode : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
utrans_openIDs = Fiddle::Function.new(
lib['utrans_openIDs'],
[
Fiddle::TYPE_VOIDP, # pErrorCode : UErrorCode* in/out
],
Fiddle::TYPE_VOIDP, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn utrans_openIDs(
pErrorCode: *mut i32 // UErrorCode* in/out
) -> *mut isize;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr utrans_openIDs(ref int pErrorCode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_utrans_openIDs' -Namespace Win32 -PassThru
# $api::utrans_openIDs(pErrorCode)#uselib "icuin.dll"
#func global utrans_openIDs "utrans_openIDs" sptr
; utrans_openIDs pErrorCode ; 戻り値は stat
; pErrorCode : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuin.dll"
#cfunc global utrans_openIDs "utrans_openIDs" int
; res = utrans_openIDs(pErrorCode)
; pErrorCode : UErrorCode* in/out -> "int"; UEnumeration* utrans_openIDs(UErrorCode* pErrorCode)
#uselib "icuin.dll"
#cfunc global utrans_openIDs "utrans_openIDs" int
; res = utrans_openIDs(pErrorCode)
; pErrorCode : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procutrans_openIDs = icuin.NewProc("utrans_openIDs")
)
// pErrorCode (UErrorCode* in/out)
r1, _, err := procutrans_openIDs.Call(
uintptr(pErrorCode),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // UEnumeration*function utrans_openIDs(
pErrorCode: Pointer // UErrorCode* in/out
): Pointer; cdecl;
external 'icuin.dll' name 'utrans_openIDs';result := DllCall("icuin\utrans_openIDs"
, "Ptr", pErrorCode ; UErrorCode* in/out
, "Cdecl Ptr") ; return: UEnumeration*●utrans_openIDs(pErrorCode) = DLL("icuin.dll", "void* utrans_openIDs(void*)")
# 呼び出し: utrans_openIDs(pErrorCode)
# pErrorCode : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。