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