IsEnclaveTypeSupported function (enclaveapi.h)

Retrieves whether the specified type of enclave is supported.

Syntax

BOOL IsEnclaveTypeSupported(
  [in] DWORD flEnclaveType
);

Parameters

[in] flEnclaveType

The type of enclave to check.

Value Meaning
ENCLAVE_TYPE_SGX
0x00000001
An enclave for the Intel Software Guard Extensions (SGX) architecture extension.
ENCLAVE_TYPE_SGX2
0x00000002
Supports SGX2 and SGX1 enclaves. The platform and OS support SGX2 instructions with EDMM on this platform (in addition to other SGX2 constructs).
ENCLAVE_TYPE_VBS
0x00000010
A virtualization-based security (VBS) enclave.

Return value

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.

For a list of common error codes, see System Error Codes. The following error codes also apply for this function.

Return code Description
ERROR_NOT_SUPPORTED
An unsupported enclave type was specified.

Remarks

ENCLAVE_TYPE_SGX2 will change a few things about how the OS handles SGX functionality:

  • It will support the new extensions to VirtualAlloc, VirtualFree, and VirtualProtect.

Requirements

   
Minimum supported client Windows 10 [desktop apps | UWP apps]
Minimum supported server Windows Server 2016 [desktop apps | UWP apps]
Target Platform Windows
Header enclaveapi.h (include Winbase.h)
Library Kernel32.lib
DLL Api-ms-win-core-enclave-l1-1-0.dll; Kernel32.dll; KernelBase.dll