Win32 API 日本語リファレンス
ホームGlobalization › uidna_close

uidna_close

関数
IDNAインスタンスを閉じて資源を解放する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

// icuuc.dll
#include <windows.h>

void uidna_close(
    UIDNA* idna
);

パラメーター

名前方向
idnaUIDNA*inout

戻り値の型: void

各言語での呼び出し定義

// icuuc.dll
#include <windows.h>

void uidna_close(
    UIDNA* idna
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uidna_close(
    ref IntPtr idna   // UIDNA* in/out
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uidna_close(
    ByRef idna As IntPtr   ' UIDNA* in/out
)
End Sub
' idna : UIDNA* in/out
Declare PtrSafe Sub uidna_close Lib "icuuc" ( _
    ByRef idna As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uidna_close = ctypes.cdll.icuuc.uidna_close
uidna_close.restype = None
uidna_close.argtypes = [
    ctypes.c_void_p,  # idna : UIDNA* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuuc.dll')
uidna_close = Fiddle::Function.new(
  lib['uidna_close'],
  [
    Fiddle::TYPE_VOIDP,  # idna : UIDNA* in/out
  ],
  Fiddle::TYPE_VOID, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn uidna_close(
        idna: *mut isize  // UIDNA* in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uidna_close(ref IntPtr idna);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_uidna_close' -Namespace Win32 -PassThru
# $api::uidna_close(idna)
#uselib "icuuc.dll"
#func global uidna_close "uidna_close" sptr
; uidna_close idna
; idna : UIDNA* in/out -> "sptr"
#uselib "icuuc.dll"
#func global uidna_close "uidna_close" int
; uidna_close idna
; idna : UIDNA* in/out -> "int"
; void uidna_close(UIDNA* idna)
#uselib "icuuc.dll"
#func global uidna_close "uidna_close" int
; uidna_close idna
; idna : UIDNA* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procuidna_close = icuuc.NewProc("uidna_close")
)

// idna (UIDNA* in/out)
r1, _, err := procuidna_close.Call(
	uintptr(idna),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure uidna_close(
  idna: Pointer   // UIDNA* in/out
); cdecl;
  external 'icuuc.dll' name 'uidna_close';
result := DllCall("icuuc\uidna_close"
    , "Ptr", idna   ; UIDNA* in/out
    , "Cdecl Int")   ; return: void
●uidna_close(idna) = DLL("icuuc.dll", "int uidna_close(void*)")
# 呼び出し: uidna_close(idna)
# idna : UIDNA* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。