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