troubleshooting Question

I need your assistance and comment how I can enhance the Visual Studio Project

Avatar of mjs2011
mjs2011Flag for Saudi Arabia asked on
C++Microsoft Visual Studio
3 Comments1 Solution50 ViewsLast Modified:
Hello I have an issue when I tried to compiled Visual studio project , I got from GitHub and I follow all instruction but still I have an issues attached

Visual studio cannot debugging because target  file exe file is missing , Please build the project and retry

Severity      Code      Description      Project      File      Line      Suppression State
Error      C2733      'CreateEnclave': you cannot overload a function with 'extern "C"' linkage      EnclaveLink      C:\Users\m_swe\source\repos\Trustee\TLSLIB\Include\enclaveapi.h      117      


// begin_1_0

/********************************************************************************

*                                                                               *

* enclaveapi.h -- ApiSet Contract for api-ms-win-core-enclave-l1-1-0            *

*                                                                               *

* Copyright (c) Microsoft Corporation. All rights reserved.                     *

*                                                                               *

********************************************************************************/



#ifdef _MSC_VER

#pragma once

#endif // _MSC_VER



#ifndef _ENCLAVEAPI_H_

#define _ENCLAVEAPI_H_



#include <apiset.h>

#include <apisetcconv.h>

#include <minwindef.h>

#include <minwinbase.h>



/* APISET_NAME: api-ms-win-core-enclave-l1 */



#if !defined(RC_INVOKED)



#ifndef _APISET_ENCLAVE_VER

#ifdef _APISET_TARGET_VERSION

#if _APISET_TARGET_VERSION >= _APISET_TARGET_VERSION_WINTHRESHOLD

#define _APISET_ENCLAVE_VER 0x0100

#endif

#endif

#endif



#endif // !defined(RC_INVOKED)





#ifdef __cplusplus

extern "C" {

#endif



#pragma region Desktop Family or OneCore Family



#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)



    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        IsEnclaveTypeSupported(

            _In_ DWORD flEnclaveType

        );





    WINBASEAPI

        _Ret_maybenull_ _Post_writable_byte_size_(dwSize)

        LPVOID

        WINAPI

        CreateEnclave(

            _In_ HANDLE hProcess,

            _In_opt_ LPVOID lpAddress,

            _In_ SIZE_T dwSize,

            _In_ SIZE_T dwInitialCommitment,

            _In_ DWORD flEnclaveType,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpEnclaveInformation,

            _In_ DWORD dwInfoLength,

            _Out_opt_ LPDWORD lpEnclaveError

        );





    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        LoadEnclaveData(

            _In_ HANDLE hProcess,

            _In_ LPVOID lpAddress,

            _In_reads_bytes_(nSize) LPCVOID lpBuffer,

            _In_ SIZE_T nSize,

            _In_ DWORD flProtect,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpPageInformation,

            _In_ DWORD dwInfoLength,

            _Out_ PSIZE_T lpNumberOfBytesWritten,

            _Out_opt_ LPDWORD lpEnclaveError

        );





    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        InitializeEnclave(

            _In_ HANDLE hProcess,

            _In_ LPVOID lpAddress,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpEnclaveInformation,

            _In_ DWORD dwInfoLength,

            _Out_opt_ LPDWORD lpEnclaveError

        );





#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */

#pragma endregion



#ifdef __cplusplus

}

#endif



#endif // _ENCLAVEAPI_H_

// end_1_0

GitHub link for project : https://github.com/HSG88/Trustee
error1.jpg
error2.jpg
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros