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