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