A sample DLL
The DLL we will build will consist of a single source file "example_dll.cpp":
#include <stdio.h>
#include "example_dll.h"
__stdcall void hello(const char *s)
{
printf("Hello %s\n", s);
}
int Double(int x)
{
return 2 * x;
}
void CppFunc(void)
{
puts("CppFunc");
}
void MyClass::func(void)
{
puts("MyClass.func()");
}
The following header "example_dll.h" declares the interface of the DLL, and is used both when building the DLL and when building an executable that uses the DLL:
<pre>
- ifndef EXAMPLE_DLL_H


Recent comments
1 year 1 week ago
1 year 1 week ago
1 year 34 weeks ago
1 year 34 weeks ago
1 year 34 weeks ago
1 year 34 weeks ago
1 year 35 weeks ago
1 year 35 weeks ago
1 year 36 weeks ago
1 year 43 weeks ago