How to send user defined structure via PostMessage
Hello,
I am trying to send a structure using PostMessage.
My structure is of the form:
typedef DATA
{
int EventID;
CString ModuleName;
CString ThreatName;
} info;
info info_data;
PostMessage(WM_MYMSG, (info_data&)wParam,NULL);
In the recieving thread I tried this way:
info_data = (info_data&)wParam; // I am getting runtime error here.
Can anyone please help me to pass a user defined structure using PotMessage?
Thanks
Madhavi
|