Hi!
I have some difficulties using the CWSerial ocx component. I want to use it under Borland C++ Builder 5.5, it's test possibility (on the Properties's test panel) works fine, I can send and receive data, but when I want to use it's methods, it doesn't work (the problem can be in using the Variant datatype). Can you send me a short Borland C++ Builder example that sends and receives data as byte array from the serial port?
Program as follows:
void __fastcall TForm1::CWSerial1DataReady(TObject *Sender,
short taskNumber, TVariant *data)
{
unsigned char* CommData;
CommData=(unsigned char*)data;
AnsiString Str;
for( int i=0;i<1
0;i++){
Str=Str+" "+*(CommData+i);
}
Edit1->Text=Str;
}
Thank you in advance!
Software Developer
LiuZongyu