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

ucfpos_setInt64IterationContext

関数
フィールド位置の64ビット反復コンテキストを設定する。
DLLicu.dll呼出規約cdecl

シグネチャ

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

void ucfpos_setInt64IterationContext(
    UConstrainedFieldPosition* ucfpos,
    LONGLONG context,
    UErrorCode* ec
);

パラメーター

名前方向
ucfposUConstrainedFieldPosition*inout
contextLONGLONGin
ecUErrorCode*inout

戻り値の型: void

各言語での呼び出し定義

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

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

ucfpos_setInt64IterationContext = ctypes.cdll.icu.ucfpos_setInt64IterationContext
ucfpos_setInt64IterationContext.restype = None
ucfpos_setInt64IterationContext.argtypes = [
    ctypes.c_void_p,  # ucfpos : UConstrainedFieldPosition* in/out
    ctypes.c_longlong,  # context : LONGLONG
    ctypes.c_void_p,  # ec : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icu.dll')
ucfpos_setInt64IterationContext = Fiddle::Function.new(
  lib['ucfpos_setInt64IterationContext'],
  [
    Fiddle::TYPE_VOIDP,  # ucfpos : UConstrainedFieldPosition* in/out
    Fiddle::TYPE_LONG_LONG,  # context : LONGLONG
    Fiddle::TYPE_VOIDP,  # ec : UErrorCode* in/out
  ],
  Fiddle::TYPE_VOID, Fiddle::Function::CDECL)
#[link(name = "icu")]
extern "C" {
    fn ucfpos_setInt64IterationContext(
        ucfpos: *mut isize,  // UConstrainedFieldPosition* in/out
        context: i64,  // LONGLONG
        ec: *mut i32  // UErrorCode* in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void ucfpos_setInt64IterationContext(ref IntPtr ucfpos, long context, ref int ec);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_ucfpos_setInt64IterationContext' -Namespace Win32 -PassThru
# $api::ucfpos_setInt64IterationContext(ucfpos, context, ec)
#uselib "icu.dll"
#func global ucfpos_setInt64IterationContext "ucfpos_setInt64IterationContext" sptr, sptr, sptr
; ucfpos_setInt64IterationContext ucfpos, context, ec
; ucfpos : UConstrainedFieldPosition* in/out -> "sptr"
; context : LONGLONG -> "sptr"
; ec : UErrorCode* in/out -> "sptr"
; ※HSP3.7は int64 引数(64bit値渡し)に非対応です。
#uselib "icu.dll"
#func global ucfpos_setInt64IterationContext "ucfpos_setInt64IterationContext" int, int64, int
; ucfpos_setInt64IterationContext ucfpos, context, ec
; ucfpos : UConstrainedFieldPosition* in/out -> "int"
; context : LONGLONG -> "int64"
; ec : UErrorCode* in/out -> "int"
; ※int64 引数の DLL 値渡しは x64 ランタイム(hsp3_64)のみ対応(x86 は未対応)。
; void ucfpos_setInt64IterationContext(UConstrainedFieldPosition* ucfpos, LONGLONG context, UErrorCode* ec)
#uselib "icu.dll"
#func global ucfpos_setInt64IterationContext "ucfpos_setInt64IterationContext" int, int64, int
; ucfpos_setInt64IterationContext ucfpos, context, ec
; ucfpos : UConstrainedFieldPosition* in/out -> "int"
; context : LONGLONG -> "int64"
; ec : UErrorCode* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procucfpos_setInt64IterationContext = icu.NewProc("ucfpos_setInt64IterationContext")
)

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