ホーム › Globalization › udat_setNumberFormat
udat_setNumberFormat
関数日付書式に使用する数値書式を設定する。
シグネチャ
// icuin.dll
#include <windows.h>
void udat_setNumberFormat(
void** fmt,
const void** numberFormatToSet
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| fmt | void** | inout |
| numberFormatToSet | void** | in |
戻り値の型: void
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
void udat_setNumberFormat(
void** fmt,
const void** numberFormatToSet
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void udat_setNumberFormat(
IntPtr fmt, // void** in/out
IntPtr numberFormatToSet // void**
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub udat_setNumberFormat(
fmt As IntPtr, ' void** in/out
numberFormatToSet As IntPtr ' void**
)
End Sub' fmt : void** in/out
' numberFormatToSet : void**
Declare PtrSafe Sub udat_setNumberFormat Lib "icuin" ( _
ByVal fmt As LongPtr, _
ByVal numberFormatToSet As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
udat_setNumberFormat = ctypes.cdll.icuin.udat_setNumberFormat
udat_setNumberFormat.restype = None
udat_setNumberFormat.argtypes = [
ctypes.c_void_p, # fmt : void** in/out
ctypes.c_void_p, # numberFormatToSet : void**
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
udat_setNumberFormat = Fiddle::Function.new(
lib['udat_setNumberFormat'],
[
Fiddle::TYPE_VOIDP, # fmt : void** in/out
Fiddle::TYPE_VOIDP, # numberFormatToSet : void**
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn udat_setNumberFormat(
fmt: *mut *mut (), // void** in/out
numberFormatToSet: *const *const () // void**
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void udat_setNumberFormat(IntPtr fmt, IntPtr numberFormatToSet);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_udat_setNumberFormat' -Namespace Win32 -PassThru
# $api::udat_setNumberFormat(fmt, numberFormatToSet)#uselib "icuin.dll"
#func global udat_setNumberFormat "udat_setNumberFormat" sptr, sptr
; udat_setNumberFormat fmt, numberFormatToSet
; fmt : void** in/out -> "sptr"
; numberFormatToSet : void** -> "sptr"#uselib "icuin.dll"
#func global udat_setNumberFormat "udat_setNumberFormat" sptr, sptr
; udat_setNumberFormat fmt, numberFormatToSet
; fmt : void** in/out -> "sptr"
; numberFormatToSet : void** -> "sptr"; void udat_setNumberFormat(void** fmt, void** numberFormatToSet)
#uselib "icuin.dll"
#func global udat_setNumberFormat "udat_setNumberFormat" intptr, intptr
; udat_setNumberFormat fmt, numberFormatToSet
; fmt : void** in/out -> "intptr"
; numberFormatToSet : void** -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procudat_setNumberFormat = icuin.NewProc("udat_setNumberFormat")
)
// fmt (void** in/out), numberFormatToSet (void**)
r1, _, err := procudat_setNumberFormat.Call(
uintptr(fmt),
uintptr(numberFormatToSet),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure udat_setNumberFormat(
fmt: Pointer; // void** in/out
numberFormatToSet: Pointer // void**
); cdecl;
external 'icuin.dll' name 'udat_setNumberFormat';result := DllCall("icuin\udat_setNumberFormat"
, "Ptr", fmt ; void** in/out
, "Ptr", numberFormatToSet ; void**
, "Cdecl Int") ; return: void●udat_setNumberFormat(fmt, numberFormatToSet) = DLL("icuin.dll", "int udat_setNumberFormat(void*, void*)")
# 呼び出し: udat_setNumberFormat(fmt, numberFormatToSet)
# fmt : void** in/out -> "void*"
# numberFormatToSet : void** -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。