ホーム › Globalization › ulocdata_getExemplarSet
ulocdata_getExemplarSet
関数ロケールの例示文字集合を取得する。
シグネチャ
// icuin.dll
#include <windows.h>
USet* ulocdata_getExemplarSet(
ULocaleData* uld,
USet* fillIn,
DWORD options,
ULocaleDataExemplarSetType extype,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| uld | ULocaleData* | inout |
| fillIn | USet* | inout |
| options | DWORD | in |
| extype | ULocaleDataExemplarSetType | in |
| status | UErrorCode* | inout |
戻り値の型: USet*
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
USet* ulocdata_getExemplarSet(
ULocaleData* uld,
USet* fillIn,
DWORD options,
ULocaleDataExemplarSetType extype,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr ulocdata_getExemplarSet(
ref IntPtr uld, // ULocaleData* in/out
ref IntPtr fillIn, // USet* in/out
uint options, // DWORD
int extype, // ULocaleDataExemplarSetType
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ulocdata_getExemplarSet(
ByRef uld As IntPtr, ' ULocaleData* in/out
ByRef fillIn As IntPtr, ' USet* in/out
options As UInteger, ' DWORD
extype As Integer, ' ULocaleDataExemplarSetType
ByRef status As Integer ' UErrorCode* in/out
) As IntPtr
End Function' uld : ULocaleData* in/out
' fillIn : USet* in/out
' options : DWORD
' extype : ULocaleDataExemplarSetType
' status : UErrorCode* in/out
Declare PtrSafe Function ulocdata_getExemplarSet Lib "icuin" ( _
ByRef uld As LongPtr, _
ByRef fillIn As LongPtr, _
ByVal options As Long, _
ByVal extype 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
ulocdata_getExemplarSet = ctypes.cdll.icuin.ulocdata_getExemplarSet
ulocdata_getExemplarSet.restype = ctypes.c_void_p
ulocdata_getExemplarSet.argtypes = [
ctypes.c_void_p, # uld : ULocaleData* in/out
ctypes.c_void_p, # fillIn : USet* in/out
wintypes.DWORD, # options : DWORD
ctypes.c_int, # extype : ULocaleDataExemplarSetType
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
ulocdata_getExemplarSet = Fiddle::Function.new(
lib['ulocdata_getExemplarSet'],
[
Fiddle::TYPE_VOIDP, # uld : ULocaleData* in/out
Fiddle::TYPE_VOIDP, # fillIn : USet* in/out
-Fiddle::TYPE_INT, # options : DWORD
Fiddle::TYPE_INT, # extype : ULocaleDataExemplarSetType
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_VOIDP, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn ulocdata_getExemplarSet(
uld: *mut isize, // ULocaleData* in/out
fillIn: *mut isize, // USet* in/out
options: u32, // DWORD
extype: i32, // ULocaleDataExemplarSetType
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 ulocdata_getExemplarSet(ref IntPtr uld, ref IntPtr fillIn, uint options, int extype, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_ulocdata_getExemplarSet' -Namespace Win32 -PassThru
# $api::ulocdata_getExemplarSet(uld, fillIn, options, extype, status)#uselib "icuin.dll"
#func global ulocdata_getExemplarSet "ulocdata_getExemplarSet" sptr, sptr, sptr, sptr, sptr
; ulocdata_getExemplarSet uld, fillIn, options, extype, status ; 戻り値は stat
; uld : ULocaleData* in/out -> "sptr"
; fillIn : USet* in/out -> "sptr"
; options : DWORD -> "sptr"
; extype : ULocaleDataExemplarSetType -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuin.dll"
#cfunc global ulocdata_getExemplarSet "ulocdata_getExemplarSet" int, int, int, int, int
; res = ulocdata_getExemplarSet(uld, fillIn, options, extype, status)
; uld : ULocaleData* in/out -> "int"
; fillIn : USet* in/out -> "int"
; options : DWORD -> "int"
; extype : ULocaleDataExemplarSetType -> "int"
; status : UErrorCode* in/out -> "int"; USet* ulocdata_getExemplarSet(ULocaleData* uld, USet* fillIn, DWORD options, ULocaleDataExemplarSetType extype, UErrorCode* status)
#uselib "icuin.dll"
#cfunc global ulocdata_getExemplarSet "ulocdata_getExemplarSet" int, int, int, int, int
; res = ulocdata_getExemplarSet(uld, fillIn, options, extype, status)
; uld : ULocaleData* in/out -> "int"
; fillIn : USet* in/out -> "int"
; options : DWORD -> "int"
; extype : ULocaleDataExemplarSetType -> "int"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
proculocdata_getExemplarSet = icuin.NewProc("ulocdata_getExemplarSet")
)
// uld (ULocaleData* in/out), fillIn (USet* in/out), options (DWORD), extype (ULocaleDataExemplarSetType), status (UErrorCode* in/out)
r1, _, err := proculocdata_getExemplarSet.Call(
uintptr(uld),
uintptr(fillIn),
uintptr(options),
uintptr(extype),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // USet*function ulocdata_getExemplarSet(
uld: Pointer; // ULocaleData* in/out
fillIn: Pointer; // USet* in/out
options: DWORD; // DWORD
extype: Integer; // ULocaleDataExemplarSetType
status: Pointer // UErrorCode* in/out
): Pointer; cdecl;
external 'icuin.dll' name 'ulocdata_getExemplarSet';result := DllCall("icuin\ulocdata_getExemplarSet"
, "Ptr", uld ; ULocaleData* in/out
, "Ptr", fillIn ; USet* in/out
, "UInt", options ; DWORD
, "Int", extype ; ULocaleDataExemplarSetType
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Ptr") ; return: USet*●ulocdata_getExemplarSet(uld, fillIn, options, extype, status) = DLL("icuin.dll", "void* ulocdata_getExemplarSet(void*, void*, dword, int, void*)")
# 呼び出し: ulocdata_getExemplarSet(uld, fillIn, options, extype, status)
# uld : ULocaleData* in/out -> "void*"
# fillIn : USet* in/out -> "void*"
# options : DWORD -> "dword"
# extype : ULocaleDataExemplarSetType -> "int"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。