Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/10/09 12:15
Read: times


 
#167004 - In VB
Responding to: ???'s previous message
In VB6 make sure to set the InputMode property of the MSComm Control to 1 - comInputModeBinary.

VB6 can actually handle having zero bytes in strings because it does not use this as a string delimiter (as like In C) but you would be highly advised to receive binary input mode data into a BYTE array. I would make any BYTE array I used be much larger than just 3 bytes to make good and sure that I didn't overflow the bounds of the data area.

If you want most control over the input data flow in input mode binary set the InputLen property of MSComm control to 1 and read the .Input into a scalar variable declared as BYTE. Then move this byte into an array of BYTE as convenient to your program design.

Michael Karas


List of 9 messages in thread
TopicAuthorDate
serial port in vb            01/01/70 00:00      
   In VB            01/01/70 00:00      
      exmple pls            01/01/70 00:00      
         Rule #1 in Serial - Always Test Tx 1st            01/01/70 00:00      
            Use 2 PC's to test comm's            01/01/70 00:00      
         As I described...            01/01/70 00:00      
            thanks. i solve my problem            01/01/70 00:00      
         Guidelines            01/01/70 00:00      
      In Theory            01/01/70 00:00      

Back to Subject List