T
T
Troodi Larson2018-02-22 22:33:24
C++ / C#
Troodi Larson, 2018-02-22 22:33:24

How to assemble dll from exe, having sources?

There is a code in c ++, a console application. I am writing an application in C #, there is no way to rewrite the code in c ++ for sharp - there is a lot of work. How to simplify the task, and use a console application inside C # and get output from there. Maybe it's like a dll can somehow be compiled and already used inside?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
VoidVolker, 2018-02-22
@troodi

In fact, there is nothing super complicated about this: open an example DLL (for example , this one ), rewrite the Main.cpp of your application with the functions you need according to the model, and get what you need. Create a solution in VisualStudio, add both projects to it (it’s just more convenient - I rebuilt the dll and you can immediately use it in the second project without additional gestures), link to the build dll and everything related in the main project (C# which), then in the C# application you do wrapper for dll and use it already as it should.

P
Profi_GMan, 2018-02-22
@Profi_GMan

You need to run the exe through a function, and then manage the input / output.
I don't know how to do it in c#, google "how to run third-party applications c#"

J
John_Nash, 2018-02-22
@John_Nash

Process.Start

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question