Hi,
I have a problem with OnData event.
When I receive a short messages all is OK. But when device sends me a big message, i don't have all message in buffor. I'm sure that meaasge was sending by device because i see that on serial monitor.
My OnData function :
void CCSerialAdapter::OnData(LPVOID lpBuffer, DWORD dwSize)
{
const char cSeparator = CHAR(10);
char* Buf;
Buf = (char*)LocalAlloc(LPTR, dwSize + 1);
ZeroMemory(Buf, dwSize + 1);
CopyMemory(Buf, lpBuffer, dwSize);
...
LocalFree((HLOCAL)Buf);
}
My connection proprtites :
m_pClient->SetTransport( wcl::ctSerial );
m_pClient->GetSerialParams()->SetPort(iPort);
m_pClient->GetSerialParams()->SetBaudRate( wcl::br115200 );
wcl::CwclBuffers buffers( m_pClient );
buffers.SetReadBuffer( 4126 );
buffers.SetWriteBuffer( 4126 );
m_pClient->SetBuffers( buffers );
This is my firs time to use WCL so forgive me if my question is stupid
Thx,