I have a class that defines a function pointer type via a typedef. This
class has a member of that function pointer type that gets set via a class
constructor. I would like this class to be able to do call backs to
external functions via this mechanism but am having linking problems. I am
unsure of the correct way to export the class / typedef. Basically, I am
trying to perform c# delegate type functionality. What is the proper way to
define the function pointer and class so they are exported with correct
linkage?
namespace Critical
{
typedef __declspec(dllexport) void (*LogEvent)(LOG_LEVELS level, TCHAR*
detail);
class __declspec(dllexport) CallbackLogger : public LoggerBase
{
private:
CallbackLogger(void); //default constructor
LogEvent m_onLogEvent;
public:
CallbackLogger(LogEvent le);
~CallbackLogger(void);
thanks!