Hi there,

I've created a thread to monitor my comport. When something is sent to the comport, I read the data, put it it a different buffer, and then tell the parent Dialog that theres data waiting. In my thread proc I use :

pseudoThis->m_pParentDlg->PostMessage(WM_COMPORT, pComInfo->nPort, 0);

To process this I use:

void CMyMainDlg::OnMsgSendCommand(LPARAM lParam)
{
...
}

No when I use this in Release Mode, the entire program crashes. However everything is fine in Debug.

Does anyone see a problem here?

Is there a better way to tell the parent that there's something waiting?

Thanks

Dustin