I cannot get the string that's sent to the com port. I know that it's sent there because I checked using a Serial Port Monitor.
Here is the function that I use for reading the string from the COM port.
Here is its in instance in the main function.Code:BOOL ReadString(void *outstring, int *length) { BYTE data; BYTE dataout[4096]={0}; int index = 0; while(ReadByte(data)== TRUE) { dataout[index++] = data; } memcpy(outstring, dataout, index); *length = index; return TRUE; }
Can you please help me on this?Code:ReadString(str,&i);
When I try to display the contents of str, what I get is an empty string.



LinkBack URL
About LinkBacks



