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

ucnv_resetToUnicode

関数
変換器のUnicode方向への変換状態をリセットする。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

void ucnv_resetToUnicode(
    UConverter* converter
);

パラメーター

名前方向
converterUConverter*inout

戻り値の型: void

各言語での呼び出し定義

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

void ucnv_resetToUnicode(
    UConverter* converter
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void ucnv_resetToUnicode(
    ref IntPtr converter   // UConverter* in/out
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub ucnv_resetToUnicode(
    ByRef converter As IntPtr   ' UConverter* in/out
)
End Sub
' converter : UConverter* in/out
Declare PtrSafe Sub ucnv_resetToUnicode 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_resetToUnicode = ctypes.cdll.icuuc.ucnv_resetToUnicode
ucnv_resetToUnicode.restype = None
ucnv_resetToUnicode.argtypes = [
    ctypes.c_void_p,  # converter : UConverter* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuuc.dll')
ucnv_resetToUnicode = Fiddle::Function.new(
  lib['ucnv_resetToUnicode'],
  [
    Fiddle::TYPE_VOIDP,  # converter : UConverter* in/out
  ],
  Fiddle::TYPE_VOID, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn ucnv_resetToUnicode(
        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_resetToUnicode(ref IntPtr converter);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ucnv_resetToUnicode' -Namespace Win32 -PassThru
# $api::ucnv_resetToUnicode(converter)
#uselib "icuuc.dll"
#func global ucnv_resetToUnicode "ucnv_resetToUnicode" sptr
; ucnv_resetToUnicode converter
; converter : UConverter* in/out -> "sptr"
#uselib "icuuc.dll"
#func global ucnv_resetToUnicode "ucnv_resetToUnicode" int
; ucnv_resetToUnicode converter
; converter : UConverter* in/out -> "int"
; void ucnv_resetToUnicode(UConverter* converter)
#uselib "icuuc.dll"
#func global ucnv_resetToUnicode "ucnv_resetToUnicode" int
; ucnv_resetToUnicode converter
; converter : UConverter* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procucnv_resetToUnicode = icuuc.NewProc("ucnv_resetToUnicode")
)

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