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