C # How to invoke a function in an unmanaged dynamic library, such as a dynamic library written with VC6, the process of calling a dynamic library in C # is much easier and quicker than Java calling DLL dynamic libraries, as illustrated below.
1. Create an unmanaged dynamic library
The code is as follows:
The code is as follows:
This sentence declares that the dynamic library outputs a function prototype that is not callable.
extern "C" __declspec (dllexport) int add (int, int);
int add (int a, int b)
{
Implement this function returna+b;
}
In addition to the Declaration,
Running GuestArticles are original, reproduced please link to the form of the address of this article
C # Calling a function method in an unmanaged dynamic library
This address: http://www.paobuke.com/develop/c-develop/pbk23137.html
Related content conversion of several formats of C # serialization and deserialization C # parsing the LRC lyrics file process to differentiate between WCF and WebService, advantages C # Super Practical Code Snippet Collection
C # accumulator Function aggregate Usages example C # method of averaging, variance, and normal distribution using random numbers of randomness extern external method using C # Implementation Method C # Singleton mode (Singleton pattern) Example Tutorial
C # Calling a function method in an unmanaged dynamic library