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