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

ucfpos_reset

関数
制約付きフィールド位置を初期状態にリセットする。
DLLicu.dll呼出規約cdecl

シグネチャ

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

void ucfpos_reset(
    UConstrainedFieldPosition* ucfpos,
    UErrorCode* ec
);

パラメーター

名前方向
ucfposUConstrainedFieldPosition*inout
ecUErrorCode*inout

戻り値の型: void

各言語での呼び出し定義

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

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

ucfpos_reset = ctypes.cdll.icu.ucfpos_reset
ucfpos_reset.restype = None
ucfpos_reset.argtypes = [
    ctypes.c_void_p,  # ucfpos : UConstrainedFieldPosition* in/out
    ctypes.c_void_p,  # ec : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icu = windows.NewLazySystemDLL("icu.dll")
	procucfpos_reset = icu.NewProc("ucfpos_reset")
)

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