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