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

unorm2_hasBoundaryBefore

関数
指定文字の前に正規化境界があるかを判定する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

CHAR unorm2_hasBoundaryBefore(
    const UNormalizer2* norm2,
    INT c
);

パラメーター

名前方向
norm2UNormalizer2*in
cINTin

戻り値の型: CHAR

各言語での呼び出し定義

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

CHAR unorm2_hasBoundaryBefore(
    const UNormalizer2* norm2,
    INT c
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte unorm2_hasBoundaryBefore(
    ref IntPtr norm2,   // UNormalizer2*
    int c   // INT
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function unorm2_hasBoundaryBefore(
    ByRef norm2 As IntPtr,   ' UNormalizer2*
    c As Integer   ' INT
) As SByte
End Function
' norm2 : UNormalizer2*
' c : INT
Declare PtrSafe Function unorm2_hasBoundaryBefore Lib "icuuc" ( _
    ByRef norm2 As LongPtr, _
    ByVal c As Long) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

unorm2_hasBoundaryBefore = ctypes.cdll.icuuc.unorm2_hasBoundaryBefore
unorm2_hasBoundaryBefore.restype = ctypes.c_byte
unorm2_hasBoundaryBefore.argtypes = [
    ctypes.c_void_p,  # norm2 : UNormalizer2*
    ctypes.c_int,  # c : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuuc.dll')
unorm2_hasBoundaryBefore = Fiddle::Function.new(
  lib['unorm2_hasBoundaryBefore'],
  [
    Fiddle::TYPE_VOIDP,  # norm2 : UNormalizer2*
    Fiddle::TYPE_INT,  # c : INT
  ],
  Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn unorm2_hasBoundaryBefore(
        norm2: *const isize,  // UNormalizer2*
        c: i32  // INT
    ) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte unorm2_hasBoundaryBefore(ref IntPtr norm2, int c);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_unorm2_hasBoundaryBefore' -Namespace Win32 -PassThru
# $api::unorm2_hasBoundaryBefore(norm2, c)
#uselib "icuuc.dll"
#func global unorm2_hasBoundaryBefore "unorm2_hasBoundaryBefore" sptr, sptr
; unorm2_hasBoundaryBefore norm2, c   ; 戻り値は stat
; norm2 : UNormalizer2* -> "sptr"
; c : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icuuc.dll"
#cfunc global unorm2_hasBoundaryBefore "unorm2_hasBoundaryBefore" int, int
; res = unorm2_hasBoundaryBefore(norm2, c)
; norm2 : UNormalizer2* -> "int"
; c : INT -> "int"
; CHAR unorm2_hasBoundaryBefore(UNormalizer2* norm2, INT c)
#uselib "icuuc.dll"
#cfunc global unorm2_hasBoundaryBefore "unorm2_hasBoundaryBefore" int, int
; res = unorm2_hasBoundaryBefore(norm2, c)
; norm2 : UNormalizer2* -> "int"
; c : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procunorm2_hasBoundaryBefore = icuuc.NewProc("unorm2_hasBoundaryBefore")
)

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