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