ホーム › Globalization › udat_close
udat_close
関数日付フォーマッタを閉じて解放する。
シグネチャ
// icuin.dll
#include <windows.h>
void udat_close(
void** format
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| format | void** | inout | udat_openで生成したUDateFormatハンドル。解放対象を指す。 |
戻り値の型: void
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
void udat_close(
void** format
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void udat_close(
IntPtr format // void** in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub udat_close(
format As IntPtr ' void** in/out
)
End Sub' format : void** in/out
Declare PtrSafe Sub udat_close Lib "icuin" ( _
ByVal format As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
udat_close = ctypes.cdll.icuin.udat_close
udat_close.restype = None
udat_close.argtypes = [
ctypes.c_void_p, # format : void** in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
udat_close = Fiddle::Function.new(
lib['udat_close'],
[
Fiddle::TYPE_VOIDP, # format : void** in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn udat_close(
format: *mut *mut () // void** in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void udat_close(IntPtr format);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_udat_close' -Namespace Win32 -PassThru
# $api::udat_close(format)#uselib "icuin.dll"
#func global udat_close "udat_close" sptr
; udat_close format
; format : void** in/out -> "sptr"#uselib "icuin.dll"
#func global udat_close "udat_close" sptr
; udat_close format
; format : void** in/out -> "sptr"; void udat_close(void** format)
#uselib "icuin.dll"
#func global udat_close "udat_close" intptr
; udat_close format
; format : void** in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procudat_close = icuin.NewProc("udat_close")
)
// format (void** in/out)
r1, _, err := procudat_close.Call(
uintptr(format),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure udat_close(
format: Pointer // void** in/out
); cdecl;
external 'icuin.dll' name 'udat_close';result := DllCall("icuin\udat_close"
, "Ptr", format ; void** in/out
, "Cdecl Int") ; return: void●udat_close(format) = DLL("icuin.dll", "int udat_close(void*)")
# 呼び出し: udat_close(format)
# format : void** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。const std = @import("std");
extern "icuin" fn udat_close(
format: ?*anyopaque // void** in/out
) callconv(.c) void;proc udat_close(
format: pointer # void** in/out
) {.importc: "udat_close", cdecl, dynlib: "icuin.dll".}pragma(lib, "icuin");
extern(C)
void udat_close(
void** format // void** in/out
);ccall((:udat_close, "icuin.dll"), Cvoid,
(Ptr{Cvoid},),
format)
# format : void** in/out -> Ptr{Cvoid}local ffi = require("ffi")
ffi.cdef[[
void udat_close(
void** format);
]]
local icuin = ffi.load("icuin")
-- icuin.udat_close(format)
-- format : void** in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('icuin.dll');
const udat_close = lib.func('__cdecl', 'udat_close', 'void', ['void *']);
// udat_close(format)
// format : void** in/out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("icuin.dll", {
udat_close: { parameters: ["pointer"], result: "void" },
});
// lib.symbols.udat_close(format)
// format : void** in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
void udat_close(
void** format);
C, "icuin.dll");
// $ffi->udat_close(format);
// format : void** in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Icuin extends Library {
Icuin INSTANCE = Native.load("icuin", Icuin.class);
void udat_close(
Pointer format // void** in/out
);
}@[Link("icuin")]
lib Libicuin
fun udat_close = udat_close(
format : Void** # void** in/out
) : Void
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef udat_closeNative = Void Function(Pointer<Void>);
typedef udat_closeDart = void Function(Pointer<Void>);
final udat_close = DynamicLibrary.open('icuin.dll')
.lookupFunction<udat_closeNative, udat_closeDart>('udat_close');
// format : void** in/out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
procedure udat_close(
format: Pointer // void** in/out
); cdecl;
external 'icuin.dll' name 'udat_close';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import ccall safe "udat_close"
c_udat_close :: Ptr () -> IO ()
-- format : void** in/out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let udat_close =
foreign "udat_close"
((ptr void) @-> returning void)
(* format : void** in/out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library icuin (t "icuin.dll"))
(cffi:use-foreign-library icuin)
(cffi:defcfun ("udat_close" udat-close :convention :cdecl) :void
(format :pointer)) ; void** in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $udat_close = Win32::API::More->new('icuin',
'void udat_close(LPVOID format)');
# my $ret = $udat_close->Call($format);
# format : void** in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。