I am currently using the following piece of code in my dll file:
typedef boost::function<void(int)> Function_Callback_type;
#pragma data_seg(".SHARED")
int common = 0 ;
Function_Callback_type funct_callback;
#pragma data_seg()
#pragma comment(linker, "/section:.SHARED,RWS")
Now I want to assign a value to funct_callback
. I read that if something is kept in the shared data segment of a dll file it needs to be initialized. My question is: How can I initialize the funct_callback
to nothing ?