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