I would like to see a video or set of instructions to the EASIEST DLL using program anyone can make (for Windows). I found this one video on youtube, but I didn't understand 1/4 of it. Thanks
Hi,
I am assuming that you want to create a DLL as well as a file to use it.
Below is a bare bones example of the two.
SimpleDLL.cpp
1 2 3 4 5 6
int __declspec(dllexport) add(int val1,int val2);
int add(int val1,int val2)
{
return(val1 + val2);
}
SimpleTest.cpp
1 2 3 4 5 6 7 8 9 10 11 12
#include <stdio.h>
int __declspec(dllimport) add(int val1,int val2);
int main(int argc,char** argv)
{
int v1 = 2;
int v2 = 3;
int res = add(v1,v2);
printf("%d + %d = %d",v1,v2,res);
}