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

DeleteEnclave

関数
指定したアドレスのエンクレーブを削除し解放する。
DLLapi-ms-win-core-enclave-l1-1-1.dll呼出規約winapiSetLastErrorあり対応OSWindows 10 以降

シグネチャ

// api-ms-win-core-enclave-l1-1-1.dll
#include <windows.h>

BOOL DeleteEnclave(
    void* lpAddress
);

パラメーター

名前方向
lpAddressvoid*in

戻り値の型: BOOL

各言語での呼び出し定義

// api-ms-win-core-enclave-l1-1-1.dll
#include <windows.h>

BOOL DeleteEnclave(
    void* lpAddress
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("api-ms-win-core-enclave-l1-1-1.dll", SetLastError = true, ExactSpelling = true)]
static extern bool DeleteEnclave(
    IntPtr lpAddress   // void*
);
<DllImport("api-ms-win-core-enclave-l1-1-1.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function DeleteEnclave(
    lpAddress As IntPtr   ' void*
) As Boolean
End Function
' lpAddress : void*
Declare PtrSafe Function DeleteEnclave Lib "api-ms-win-core-enclave-l1-1-1" ( _
    ByVal lpAddress As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

DeleteEnclave = ctypes.windll.LoadLibrary("api-ms-win-core-enclave-l1-1-1.dll").DeleteEnclave
DeleteEnclave.restype = wintypes.BOOL
DeleteEnclave.argtypes = [
    ctypes.POINTER(None),  # lpAddress : void*
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('api-ms-win-core-enclave-l1-1-1.dll')
DeleteEnclave = Fiddle::Function.new(
  lib['DeleteEnclave'],
  [
    Fiddle::TYPE_VOIDP,  # lpAddress : void*
  ],
  Fiddle::TYPE_INT)
#[link(name = "api-ms-win-core-enclave-l1-1-1")]
extern "system" {
    fn DeleteEnclave(
        lpAddress: *mut ()  // void*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("api-ms-win-core-enclave-l1-1-1.dll", SetLastError = true)]
public static extern bool DeleteEnclave(IntPtr lpAddress);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-enclave-l1-1-1_DeleteEnclave' -Namespace Win32 -PassThru
# $api::DeleteEnclave(lpAddress)
#uselib "api-ms-win-core-enclave-l1-1-1.dll"
#func global DeleteEnclave "DeleteEnclave" sptr
; DeleteEnclave lpAddress   ; 戻り値は stat
; lpAddress : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "api-ms-win-core-enclave-l1-1-1.dll"
#cfunc global DeleteEnclave "DeleteEnclave" sptr
; res = DeleteEnclave(lpAddress)
; lpAddress : void* -> "sptr"
; BOOL DeleteEnclave(void* lpAddress)
#uselib "api-ms-win-core-enclave-l1-1-1.dll"
#cfunc global DeleteEnclave "DeleteEnclave" intptr
; res = DeleteEnclave(lpAddress)
; lpAddress : void* -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	api_ms_win_core_enclave_l1_1_1 = windows.NewLazySystemDLL("api-ms-win-core-enclave-l1-1-1.dll")
	procDeleteEnclave = api_ms_win_core_enclave_l1_1_1.NewProc("DeleteEnclave")
)

// lpAddress (void*)
r1, _, err := procDeleteEnclave.Call(
	uintptr(lpAddress),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function DeleteEnclave(
  lpAddress: Pointer   // void*
): BOOL; stdcall;
  external 'api-ms-win-core-enclave-l1-1-1.dll' name 'DeleteEnclave';
result := DllCall("api-ms-win-core-enclave-l1-1-1\DeleteEnclave"
    , "Ptr", lpAddress   ; void*
    , "Int")   ; return: BOOL
●DeleteEnclave(lpAddress) = DLL("api-ms-win-core-enclave-l1-1-1.dll", "bool DeleteEnclave(void*)")
# 呼び出し: DeleteEnclave(lpAddress)
# lpAddress : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。