LoadEnclaveImageW function (enclaveapi.h)

Loads an image and all of its imports into an enclave.

Syntax

BOOL LoadEnclaveImageW(
  [in] LPVOID  lpEnclaveAddress,
  [in] LPCWSTR lpImageName
);

Parameters

[in] lpEnclaveAddress

The base address of the image into which to load the image.

[in] lpImageName

A NULL-terminated string that contains the name of the image to load.

Return value

TRUE if the function succeeds; otherwise FALSE. To get extended error information, call GetLastError.

Remarks

LoadEnclaveImage is only supported enclaves that have the ENCLAVE_TYPE_VBS enclave type.

You cannot load an image into the enclave after it has been initialized with InitializeEnclave.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header enclaveapi.h
Library onecore.lib
DLL kernel32.dll; Api-ms-win-core-enclave-l1-1-0.dll

See also

Enclave functions

CreateEnclave

InitializeEnclave