I saw this piece of code in an article I am reading.
class EXAMPLEUNMANAGEDDLL_API CUnmanagedTestClass
{
public:
CUnmanagedTestClass();
virtual ~CUn
Such constructs are used in Windows to control whether the class is being used while building a DLL or it is being used to build a user of the DLL.
When building the DLL, EXAMPLEUNMANAGEDDLL_API
needs to expand to __declspec(dllexport)
.
When buidling users of the DLL, EXAMPLEUNMANAGEDDLL_API
needs to expand to __declspec(dllimport)
.
Further information can be found at: