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

ucol_getMaxVariable

関数
可変扱いとする最大文字グループを取得する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

UColReorderCode ucol_getMaxVariable(
    const UCollator* coll
);

パラメーター

名前方向
collUCollator*in

戻り値の型: UColReorderCode

各言語での呼び出し定義

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

UColReorderCode ucol_getMaxVariable(
    const UCollator* coll
);
[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int ucol_getMaxVariable(
    ref IntPtr coll   // UCollator*
);
<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ucol_getMaxVariable(
    ByRef coll As IntPtr   ' UCollator*
) As Integer
End Function
' coll : UCollator*
Declare PtrSafe Function ucol_getMaxVariable Lib "icuin" ( _
    ByRef coll As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ucol_getMaxVariable = ctypes.cdll.icuin.ucol_getMaxVariable
ucol_getMaxVariable.restype = ctypes.c_int
ucol_getMaxVariable.argtypes = [
    ctypes.c_void_p,  # coll : UCollator*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procucol_getMaxVariable = icuin.NewProc("ucol_getMaxVariable")
)

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