ホーム › System.Environment › IsEnclaveTypeSupported
IsEnclaveTypeSupported
関数指定した種類のエンクレーブがサポートされているか判定する。
シグネチャ
// KERNEL32.dll
#include <windows.h>
BOOL IsEnclaveTypeSupported(
DWORD flEnclaveType
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| flEnclaveType | DWORD | in |
戻り値の型: BOOL
各言語での呼び出し定義
// KERNEL32.dll
#include <windows.h>
BOOL IsEnclaveTypeSupported(
DWORD flEnclaveType
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool IsEnclaveTypeSupported(
uint flEnclaveType // DWORD
);<DllImport("KERNEL32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function IsEnclaveTypeSupported(
flEnclaveType As UInteger ' DWORD
) As Boolean
End Function' flEnclaveType : DWORD
Declare PtrSafe Function IsEnclaveTypeSupported Lib "kernel32" ( _
ByVal flEnclaveType As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
IsEnclaveTypeSupported = ctypes.windll.kernel32.IsEnclaveTypeSupported
IsEnclaveTypeSupported.restype = wintypes.BOOL
IsEnclaveTypeSupported.argtypes = [
wintypes.DWORD, # flEnclaveType : DWORD
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('KERNEL32.dll')
IsEnclaveTypeSupported = Fiddle::Function.new(
lib['IsEnclaveTypeSupported'],
[
-Fiddle::TYPE_INT, # flEnclaveType : DWORD
],
Fiddle::TYPE_INT)#[link(name = "kernel32")]
extern "system" {
fn IsEnclaveTypeSupported(
flEnclaveType: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true)]
public static extern bool IsEnclaveTypeSupported(uint flEnclaveType);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_IsEnclaveTypeSupported' -Namespace Win32 -PassThru
# $api::IsEnclaveTypeSupported(flEnclaveType)#uselib "KERNEL32.dll"
#func global IsEnclaveTypeSupported "IsEnclaveTypeSupported" sptr
; IsEnclaveTypeSupported flEnclaveType ; 戻り値は stat
; flEnclaveType : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "KERNEL32.dll"
#cfunc global IsEnclaveTypeSupported "IsEnclaveTypeSupported" int
; res = IsEnclaveTypeSupported(flEnclaveType)
; flEnclaveType : DWORD -> "int"; BOOL IsEnclaveTypeSupported(DWORD flEnclaveType)
#uselib "KERNEL32.dll"
#cfunc global IsEnclaveTypeSupported "IsEnclaveTypeSupported" int
; res = IsEnclaveTypeSupported(flEnclaveType)
; flEnclaveType : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
procIsEnclaveTypeSupported = kernel32.NewProc("IsEnclaveTypeSupported")
)
// flEnclaveType (DWORD)
r1, _, err := procIsEnclaveTypeSupported.Call(
uintptr(flEnclaveType),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction IsEnclaveTypeSupported(
flEnclaveType: DWORD // DWORD
): BOOL; stdcall;
external 'KERNEL32.dll' name 'IsEnclaveTypeSupported';result := DllCall("KERNEL32\IsEnclaveTypeSupported"
, "UInt", flEnclaveType ; DWORD
, "Int") ; return: BOOL●IsEnclaveTypeSupported(flEnclaveType) = DLL("KERNEL32.dll", "bool IsEnclaveTypeSupported(dword)")
# 呼び出し: IsEnclaveTypeSupported(flEnclaveType)
# flEnclaveType : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。