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