I'm receiving data from COM1 port char by char and i would like to capture this data from other port(COM3).
LONG CMainFrame::OnCommunication(WPARAM ch, LPARAM port)
WriteDataEx(m_strCapturePath,l_file, (char*)l_com_buffer,1024, FALSE);
WriteDataEx(const CString& f_strFilepath, CFile& f_file, char* cInput, const int f_size, BOOL bConfig)
So how to form each chars as chunk and send to writedataex function ?
Logically what you wish to do is to create a static buffer which can hold up to 1KB of data.
Each character is first added to the buffer.
If the current size of the buffer is less than the chunk size, add it to the chunk.
If the size of the buffer reaches the chunk size, write the chunk data.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)