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