#ifndef _NTMMAPI_H
//
// Enclave support
//
#if (PHNT_VERSION >= PHNT_WINDOWS_10)
/**
* Loads data into an uninitialized enclave that you created by calling NtCreateEnclave.
*
* @param ProcessHandle A handle to the process for which the enclave was created.
* @param BaseAddress The address in the enclave where you want to load the data.
* @param Buffer A pointer to the data the you want to load into the enclave.
* @param BufferSize The size of the data that you want to load into the enclave, in bytes. This value must be a whole-number multiple of the page size.
* @param Protect The memory protection to use for the pages that you want to add to the enclave.
* @param PageInformation A pointer to information that describes the pages that you want to add to the enclave.
* @param PageInformationLength The length of the structure that the PageInformation parameter points to, in bytes.
* @param NumberOfBytesWritten A pointer to a variable that receives the number of bytes that NtLoadEnclaveData copied into the enclave.
* @param EnclaveError An optional pointer to a variable that receives an enclave error code that is architecture-specific.
* @return NTSTATUS Successful or errant status.
* @see https://learn.microsoft.com/en-us/windows/win32/api/enclaveapi/nf-enclaveapi-loadenclavedata
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtLoadEnclaveData(
_In_ HANDLE ProcessHandle,
_In_ PVOID BaseAddress,
_In_reads_bytes_(BufferSize) PVOID Buffer,
_In_ SIZE_T BufferSize,
_In_ ULONG Protect,
_In_reads_bytes_(PageInformationLength) PVOID PageInformation,
_In_ ULONG PageInformationLength,
_Out_opt_ PSIZE_T NumberOfBytesWritten,
_Out_opt_ PULONG EnclaveError
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwLoadEnclaveData(
_In_ HANDLE ProcessHandle,
_In_ PVOID BaseAddress,
_In_reads_bytes_(BufferSize) PVOID Buffer,
_In_ SIZE_T BufferSize,
_In_ ULONG Protect,
_In_reads_bytes_(PageInformationLength) PVOID PageInformation,
_In_ ULONG PageInformationLength,
_Out_opt_ PSIZE_T NumberOfBytesWritten,
_Out_opt_ PULONG EnclaveError
);
View code on GitHub
No description available.