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