|
-
August 30th, 1999, 12:51 PM
#1
SendMessage from Thread
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|