ホーム › Globalization › ucnv_isFixedWidth
ucnv_isFixedWidth
関数コンバーターが固定幅エンコーディングか判定する。
シグネチャ
// icuuc.dll
#include <windows.h>
CHAR ucnv_isFixedWidth(
UConverter* cnv,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| cnv | UConverter* | inout |
| status | UErrorCode* | inout |
戻り値の型: CHAR
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
CHAR ucnv_isFixedWidth(
UConverter* cnv,
UErrorCode* status
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte ucnv_isFixedWidth(
ref IntPtr cnv, // UConverter* in/out
ref int status // UErrorCode* in/out
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ucnv_isFixedWidth(
ByRef cnv As IntPtr, ' UConverter* in/out
ByRef status As Integer ' UErrorCode* in/out
) As SByte
End Function' cnv : UConverter* in/out
' status : UErrorCode* in/out
Declare PtrSafe Function ucnv_isFixedWidth Lib "icuuc" ( _
ByRef cnv As LongPtr, _
ByRef status As Long) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ucnv_isFixedWidth = ctypes.cdll.icuuc.ucnv_isFixedWidth
ucnv_isFixedWidth.restype = ctypes.c_byte
ucnv_isFixedWidth.argtypes = [
ctypes.c_void_p, # cnv : UConverter* in/out
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
ucnv_isFixedWidth = Fiddle::Function.new(
lib['ucnv_isFixedWidth'],
[
Fiddle::TYPE_VOIDP, # cnv : UConverter* in/out
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn ucnv_isFixedWidth(
cnv: *mut isize, // UConverter* in/out
status: *mut i32 // UErrorCode* in/out
) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte ucnv_isFixedWidth(ref IntPtr cnv, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ucnv_isFixedWidth' -Namespace Win32 -PassThru
# $api::ucnv_isFixedWidth(cnv, status)#uselib "icuuc.dll"
#func global ucnv_isFixedWidth "ucnv_isFixedWidth" sptr, sptr
; ucnv_isFixedWidth cnv, status ; 戻り値は stat
; cnv : UConverter* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuuc.dll"
#cfunc global ucnv_isFixedWidth "ucnv_isFixedWidth" int, int
; res = ucnv_isFixedWidth(cnv, status)
; cnv : UConverter* in/out -> "int"
; status : UErrorCode* in/out -> "int"; CHAR ucnv_isFixedWidth(UConverter* cnv, UErrorCode* status)
#uselib "icuuc.dll"
#cfunc global ucnv_isFixedWidth "ucnv_isFixedWidth" int, int
; res = ucnv_isFixedWidth(cnv, status)
; cnv : UConverter* in/out -> "int"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
procucnv_isFixedWidth = icuuc.NewProc("ucnv_isFixedWidth")
)
// cnv (UConverter* in/out), status (UErrorCode* in/out)
r1, _, err := procucnv_isFixedWidth.Call(
uintptr(cnv),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // CHARfunction ucnv_isFixedWidth(
cnv: Pointer; // UConverter* in/out
status: Pointer // UErrorCode* in/out
): Shortint; cdecl;
external 'icuuc.dll' name 'ucnv_isFixedWidth';result := DllCall("icuuc\ucnv_isFixedWidth"
, "Ptr", cnv ; UConverter* in/out
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Char") ; return: CHAR●ucnv_isFixedWidth(cnv, status) = DLL("icuuc.dll", "char ucnv_isFixedWidth(void*, void*)")
# 呼び出し: ucnv_isFixedWidth(cnv, status)
# cnv : UConverter* in/out -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。