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

utrace_getLevel

関数
ICUのトレース出力レベルを取得する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

INT utrace_getLevel(void);

パラメーターなし。戻り値: INT

各言語での呼び出し定義

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

INT utrace_getLevel(void);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern int utrace_getLevel();
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function utrace_getLevel() As Integer
End Function
Declare PtrSafe Function utrace_getLevel Lib "icuuc" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

utrace_getLevel = ctypes.cdll.icuuc.utrace_getLevel
utrace_getLevel.restype = ctypes.c_int
utrace_getLevel.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuuc.dll')
utrace_getLevel = Fiddle::Function.new(
  lib['utrace_getLevel'],
  [],
  Fiddle::TYPE_INT, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn utrace_getLevel() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int utrace_getLevel();
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_utrace_getLevel' -Namespace Win32 -PassThru
# $api::utrace_getLevel()
#uselib "icuuc.dll"
#func global utrace_getLevel "utrace_getLevel"
; utrace_getLevel   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icuuc.dll"
#cfunc global utrace_getLevel "utrace_getLevel"
; res = utrace_getLevel()
; INT utrace_getLevel()
#uselib "icuuc.dll"
#cfunc global utrace_getLevel "utrace_getLevel"
; res = utrace_getLevel()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procutrace_getLevel = icuuc.NewProc("utrace_getLevel")
)

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