Not sure if the format will be the same, since I use visual studio 2010 professional, but..
Setting the project to build a DLL;
- Right Click on Project in Solution Explorer, Click Properties,
- Ensure 'Configuration Properties/General' is selected in list,
- Change 'Configuration Type' to 'Dynamic Library (.DLL)'.
Creating a DLL in source;
- Add a new CPP file to your project, call it whatever.
- Use the following template:
// - Include Windows.h for MessageBox Functionality -
#include <windows.h>
// - DLL Export Definition -
#define Export __declspec(dllexport)
Export void TestFunction()
{
MessageBox(0, "Hello World!", "DLL Test", 0);
}
- Build Project as normal, and in the output directory (usually Debug, or Release) will be your DLL file.
NOTE
To use undecorated function names (i.e. Not ?Test@@blah blah), put the following code around the functions;.. The functions exported will match the function names in source.
extern "C"
{
// - Function Names Here -
}
Regards,
Mikey