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

uregion_getContainedRegionsOfType

関数
指定タイプの含有下位地域の列挙を取得する。
DLLicuin.dll呼出規約cdecl

シグネチャ

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

UEnumeration* uregion_getContainedRegionsOfType(
    const URegion* uregion,
    URegionType type,
    UErrorCode* status
);

パラメーター

名前方向
uregionURegion*in
typeURegionTypein
statusUErrorCode*inout

戻り値の型: UEnumeration*

各言語での呼び出し定義

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

UEnumeration* uregion_getContainedRegionsOfType(
    const URegion* uregion,
    URegionType type,
    UErrorCode* status
);
[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr uregion_getContainedRegionsOfType(
    ref IntPtr uregion,   // URegion*
    int type,   // URegionType
    ref int status   // UErrorCode* in/out
);
<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uregion_getContainedRegionsOfType(
    ByRef uregion As IntPtr,   ' URegion*
    type As Integer,   ' URegionType
    ByRef status As Integer   ' UErrorCode* in/out
) As IntPtr
End Function
' uregion : URegion*
' type : URegionType
' status : UErrorCode* in/out
Declare PtrSafe Function uregion_getContainedRegionsOfType Lib "icuin" ( _
    ByRef uregion As LongPtr, _
    ByVal type As Long, _
    ByRef status As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uregion_getContainedRegionsOfType = ctypes.cdll.icuin.uregion_getContainedRegionsOfType
uregion_getContainedRegionsOfType.restype = ctypes.c_void_p
uregion_getContainedRegionsOfType.argtypes = [
    ctypes.c_void_p,  # uregion : URegion*
    ctypes.c_int,  # type : URegionType
    ctypes.c_void_p,  # status : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procuregion_getContainedRegionsOfType = icuin.NewProc("uregion_getContainedRegionsOfType")
)

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