Win32 API 日本語リファレンス
ホームSystem.Environment › EnclaveGetEnclaveInformation

EnclaveGetEnclaveInformation

関数
現在のエンクレーブに関する情報を取得する。
DLLvertdll.dll呼出規約winapi対応OSWindows 10 以降

シグネチャ

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

HRESULT EnclaveGetEnclaveInformation(
    DWORD InformationSize,
    ENCLAVE_INFORMATION* EnclaveInformation
);

パラメーター

名前方向
InformationSizeDWORDin
EnclaveInformationENCLAVE_INFORMATION*out

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT EnclaveGetEnclaveInformation(
    DWORD InformationSize,
    ENCLAVE_INFORMATION* EnclaveInformation
);
[DllImport("vertdll.dll", ExactSpelling = true)]
static extern int EnclaveGetEnclaveInformation(
    uint InformationSize,   // DWORD
    IntPtr EnclaveInformation   // ENCLAVE_INFORMATION* out
);
<DllImport("vertdll.dll", ExactSpelling:=True)>
Public Shared Function EnclaveGetEnclaveInformation(
    InformationSize As UInteger,   ' DWORD
    EnclaveInformation As IntPtr   ' ENCLAVE_INFORMATION* out
) As Integer
End Function
' InformationSize : DWORD
' EnclaveInformation : ENCLAVE_INFORMATION* out
Declare PtrSafe Function EnclaveGetEnclaveInformation Lib "vertdll" ( _
    ByVal InformationSize As Long, _
    ByVal EnclaveInformation As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

EnclaveGetEnclaveInformation = ctypes.windll.vertdll.EnclaveGetEnclaveInformation
EnclaveGetEnclaveInformation.restype = ctypes.c_int
EnclaveGetEnclaveInformation.argtypes = [
    wintypes.DWORD,  # InformationSize : DWORD
    ctypes.c_void_p,  # EnclaveInformation : ENCLAVE_INFORMATION* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('vertdll.dll')
EnclaveGetEnclaveInformation = Fiddle::Function.new(
  lib['EnclaveGetEnclaveInformation'],
  [
    -Fiddle::TYPE_INT,  # InformationSize : DWORD
    Fiddle::TYPE_VOIDP,  # EnclaveInformation : ENCLAVE_INFORMATION* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "vertdll")]
extern "system" {
    fn EnclaveGetEnclaveInformation(
        InformationSize: u32,  // DWORD
        EnclaveInformation: *mut ENCLAVE_INFORMATION  // ENCLAVE_INFORMATION* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("vertdll.dll")]
public static extern int EnclaveGetEnclaveInformation(uint InformationSize, IntPtr EnclaveInformation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'vertdll_EnclaveGetEnclaveInformation' -Namespace Win32 -PassThru
# $api::EnclaveGetEnclaveInformation(InformationSize, EnclaveInformation)
#uselib "vertdll.dll"
#func global EnclaveGetEnclaveInformation "EnclaveGetEnclaveInformation" sptr, sptr
; EnclaveGetEnclaveInformation InformationSize, varptr(EnclaveInformation)   ; 戻り値は stat
; InformationSize : DWORD -> "sptr"
; EnclaveInformation : ENCLAVE_INFORMATION* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "vertdll.dll"
#cfunc global EnclaveGetEnclaveInformation "EnclaveGetEnclaveInformation" int, var
; res = EnclaveGetEnclaveInformation(InformationSize, EnclaveInformation)
; InformationSize : DWORD -> "int"
; EnclaveInformation : ENCLAVE_INFORMATION* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT EnclaveGetEnclaveInformation(DWORD InformationSize, ENCLAVE_INFORMATION* EnclaveInformation)
#uselib "vertdll.dll"
#cfunc global EnclaveGetEnclaveInformation "EnclaveGetEnclaveInformation" int, var
; res = EnclaveGetEnclaveInformation(InformationSize, EnclaveInformation)
; InformationSize : DWORD -> "int"
; EnclaveInformation : ENCLAVE_INFORMATION* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	vertdll = windows.NewLazySystemDLL("vertdll.dll")
	procEnclaveGetEnclaveInformation = vertdll.NewProc("EnclaveGetEnclaveInformation")
)

// InformationSize (DWORD), EnclaveInformation (ENCLAVE_INFORMATION* out)
r1, _, err := procEnclaveGetEnclaveInformation.Call(
	uintptr(InformationSize),
	uintptr(EnclaveInformation),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function EnclaveGetEnclaveInformation(
  InformationSize: DWORD;   // DWORD
  EnclaveInformation: Pointer   // ENCLAVE_INFORMATION* out
): Integer; stdcall;
  external 'vertdll.dll' name 'EnclaveGetEnclaveInformation';
result := DllCall("vertdll\EnclaveGetEnclaveInformation"
    , "UInt", InformationSize   ; DWORD
    , "Ptr", EnclaveInformation   ; ENCLAVE_INFORMATION* out
    , "Int")   ; return: HRESULT
●EnclaveGetEnclaveInformation(InformationSize, EnclaveInformation) = DLL("vertdll.dll", "int EnclaveGetEnclaveInformation(dword, void*)")
# 呼び出し: EnclaveGetEnclaveInformation(InformationSize, EnclaveInformation)
# InformationSize : DWORD -> "dword"
# EnclaveInformation : ENCLAVE_INFORMATION* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。