March 15, 2010 at March 15, 2010 · Filed under enart.nnxj.comedit
I am trying to use the activeX component "MSComm"
with Borland C++ Builder 6 in Windows2000.
I applied the following code:
MSComm1->Settings="115200,n,8,1";
MSComm1->InBufferSize=32000;
MSComm1->InputMode=comInputModeBinary;
MSComm1->InputLen=1;
MSComm1->RThreshold=10;
MSComm1->InBufferCount=0;
MSComm1->NullDiscard=false;
MSComm1->PortOpen=True;
void ...MSComm1Comm(...)
VARIANT M;
for(k=0;k
InBufferCount;k++){
M=MSComm1->Input;
X[k]=M.bVal;
}
X is an array of type unsigned char.
When I try to retrieve the input bytes from X I get wrong data.
I would like to get code that gets the correct data into X.
#If you have any other info about this subject , Please add it free.# |
|