How to call method in c++ using asp.net core?

mc 4,616 Reputation points
2021-04-09T23:01:21.15+00:00

I am using asp.net core web api and want to call c++ method on the same server how to do it?

the c++ method is individual running in a exe file or in a service can it be done?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,612 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,761 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jerry Cai-MSFT 991 Reputation points
    2021-04-12T07:44:59.967+00:00

    Hi,65841535

    To call a C++ exe in a .net core project, you can try to use Process class, related tutorial here:

    system.diagnostics.process

    It can provide access to local and remote processes and enables you to start and stop local system processes.

    Best Regards,
    Jerry Cai
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.