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