ホーム › Globalization › usprep_close
usprep_close
関数StringPrepプロファイルを閉じて資源を解放する。
シグネチャ
// icuuc.dll
#include <windows.h>
void usprep_close(
UStringPrepProfile* profile
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| profile | UStringPrepProfile* | inout |
戻り値の型: void
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
void usprep_close(
UStringPrepProfile* profile
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void usprep_close(
ref IntPtr profile // UStringPrepProfile* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub usprep_close(
ByRef profile As IntPtr ' UStringPrepProfile* in/out
)
End Sub' profile : UStringPrepProfile* in/out
Declare PtrSafe Sub usprep_close Lib "icuuc" ( _
ByRef profile As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
usprep_close = ctypes.cdll.icuuc.usprep_close
usprep_close.restype = None
usprep_close.argtypes = [
ctypes.c_void_p, # profile : UStringPrepProfile* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
usprep_close = Fiddle::Function.new(
lib['usprep_close'],
[
Fiddle::TYPE_VOIDP, # profile : UStringPrepProfile* in/out
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn usprep_close(
profile: *mut isize // UStringPrepProfile* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void usprep_close(ref IntPtr profile);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_usprep_close' -Namespace Win32 -PassThru
# $api::usprep_close(profile)#uselib "icuuc.dll"
#func global usprep_close "usprep_close" sptr
; usprep_close profile
; profile : UStringPrepProfile* in/out -> "sptr"#uselib "icuuc.dll"
#func global usprep_close "usprep_close" int
; usprep_close profile
; profile : UStringPrepProfile* in/out -> "int"; void usprep_close(UStringPrepProfile* profile)
#uselib "icuuc.dll"
#func global usprep_close "usprep_close" int
; usprep_close profile
; profile : UStringPrepProfile* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procusprep_close = icuuc.NewProc("usprep_close")
)
// profile (UStringPrepProfile* in/out)
r1, _, err := procusprep_close.Call(
uintptr(profile),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure usprep_close(
profile: Pointer // UStringPrepProfile* in/out
); cdecl;
external 'icuuc.dll' name 'usprep_close';result := DllCall("icuuc\usprep_close"
, "Ptr", profile ; UStringPrepProfile* in/out
, "Cdecl Int") ; return: void●usprep_close(profile) = DLL("icuuc.dll", "int usprep_close(void*)")
# 呼び出し: usprep_close(profile)
# profile : UStringPrepProfile* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。