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
2 years 16 weeks ago
2 years 16 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 50 weeks ago
3 years 5 weeks ago