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

ucfpos_getInt64IterationContext

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

シグネチャ

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

LONGLONG ucfpos_getInt64IterationContext(
    const UConstrainedFieldPosition* ucfpos,
    UErrorCode* ec
);

パラメーター

名前方向
ucfposUConstrainedFieldPosition*in
ecUErrorCode*inout

戻り値の型: LONGLONG

各言語での呼び出し定義

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

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

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

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

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procucfpos_getInt64IterationContext = icu.NewProc("ucfpos_getInt64IterationContext")
)

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