// myheader.h
#ifndef MYHEADER_H
#define MYHEADER_H
// put here the include files needed to compile the header
#include <...>
// the following makes your header an import header for other projects
// and an export header for the dll project itself.
// define MYDLL_EXPORTS in the c++ - precprocessor macros for both debug and release config
#ifdef MYDLL_EXPORTS
#define MYDLL_API __declspec(dllexport)
#else
#define MYDLL_API __declspec(dllimport)
#endif
// exported c functions functions
#ifdef __cplusplus
extern "C"
{
#endif
MYDLL_API void some_exported_function(int, char*);
#ifdef __cplusplus
}
#endif
// exported classes (or structs)
#ifdef __cplusplus
class MYDLL_API SomeExportedClass
{
....
};
// more classes
...
#endif // __cplusplus
#endif // MYHEADER_H
with the above you can access functions and classes from other c/c++ projects if you link against the .lib which is output from your dll project.
It is not executable. DLL's cannot be run directly. You need to refer it to other project and use its methods and properties per your needs.
Create any executable (console/windows) project and refer (add it to references) your created DLL to it.
http://msdn.microsoft.com/en-us/library/ms235636.aspx