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?
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?
Your best method IMO is to use as DLL.
https://blog.quickbird.uk/calling-c-from-net-core-759563bab75d
I am not want to call a method in dll I just want to call method which is running
Hi,65841535
To call a C++ exe in a .net core project, you can try to use Process class, related tutorial here:
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.
Thank you @JerryCai-MSFT but I do not want to start a process.
what I want is to run a method in a exe which is already running.
Yes, you can run an exe from ASP.NET Core program, but to run a method, the exe would have to be modified to accept a parameter to know to execute the method.
https://codeburst.io/run-an-external-executable-in-asp-net-core-5c2f8b6cacd9
13 people are following this question.