We can create DLL with one source file and one header file. Header file contains only the declaration of the functions exported from the DLL.
Header file: header.h is the name of the header file.
extern "C" __declspec(dllexport) returntype function1(argument);
extern "C" __declspec(dllexport) returntype function2(argument);
Source file source.cpp is the name of the source file this is the actual file containing the actual functionality of the exported functions.
#include<header.h> //include the header file containing the declaration of the exported functions in the dll
returntype function1(arguments)
{
write your code here
return statement
}
returntype function2(arguments)
{
write your code here
return
}
Header file: header.h is the name of the header file.
extern "C" __declspec(dllexport) returntype function1(argument);
extern "C" __declspec(dllexport) returntype function2(argument);
Source file source.cpp is the name of the source file this is the actual file containing the actual functionality of the exported functions.
#include<header.h> //include the header file containing the declaration of the exported functions in the dll
returntype function1(arguments)
{
write your code here
return statement
}
returntype function2(arguments)
{
write your code here
return
}