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