I have zero experience in C ++, but I have experience in C # for several years.
Are there any examples showing how I can create a method in a C ++ program that is then called from a C # program using a DLL?
Greetings
Using p / invoke, you can call C ++ code from C #.
Read the following: Win32 DLL call in C # with P / Invoke
Another small but good article: Using P / Invoke to access the Win32 API
-
EDIT:
This aritcle explains how to create a DLL in C and then use it with C #
You can also try compiling C ++ code in Visual Studio on VC ++, which is plain old .NET. Avoid p / invoke if the code is compatible.
Create some function in C ++ using "extern "C"" to avoid changing the name of C ++, and then use PInvoke, as suggested by Nawaz, is the best way.
"extern "C""
Source: https://habr.com/ru/post/1339628/More articles:What is fast Fourier transform? - mathWhat happens if I repeat the CSS style in IE? - cssI like Stripes, but I use sl4j / logback for logging, what are my options? - javaUsing git-svn to ignore file only in svn repository? - gitModules between multiple versions of Python Linux - pythonHow to assign a host name to a web server? - webservermaven release: don't plan to deploy projects with release version - maven-release-pluginCreating dynamic user names and assgin roles - sqlSQL CREATE LOGON - cannot use @parameter as username - sqlFailed to check date in Spring MVC - dateAll Articles