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

ucsdet_close

関数
文字セット判定器を閉じて解放する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

void ucsdet_close(
    UCharsetDetector* ucsd
);

パラメーター

名前方向
ucsdUCharsetDetector*inout

戻り値の型: void

各言語での呼び出し定義

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

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

ucsdet_close = ctypes.cdll.icuin.ucsdet_close
ucsdet_close.restype = None
ucsdet_close.argtypes = [
    ctypes.c_void_p,  # ucsd : UCharsetDetector* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procucsdet_close = icuin.NewProc("ucsdet_close")
)

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