Through the PostThreadMessage function to send data to the thread, and then through the PeekMessage function to receive data in the thread, But the PeekMessage function receives (LPSTR) MSG. LParam sometimes right or wrong, most of the time to receive the Is the code; (DWORD) MSG. WParam data are correct, how to solve this problem? Below is the code,
if (m_pWriteThread - & gt; M_dwWriteThreadID PostThreadMessage (/* and */ PWM_COMMWRITE (WPARAM) dwBytesToWrite, (LPARAM) lpByte))