The information in this article applies to:
SUMMARYThis article covers some of the most Frequently Asked Questions (FAQs) about using the Visual Basic 4.0 Communications (MSComm) control for receiving and transmitting binary data. You can find this and other FAQ articles by querying on the keyword "FAQ." You can find additional general references in the Microsoft Knowledge Base by searching on "article list." MORE INFORMATIONQ. Can the MSComm control (MSComm16.OCX and MSComm32.OCX) be used to
transmit and receive binary data?
Q. Why can't machines using a double byte character set (DBCS) use the MSComm control (MSComm16.OCX and MSComm32.OCX) to transmit and receive binary data? A. On DBCS machines (computers running operating system software that uses one of the double byte character sets), binary data will be corrupted if one of the binary values matches a DBCS lead character. The MSComm control will interpret this byte and the following byte as one double byte character and return only one (now incorrect) byte for the "equivalent" ASCII character. For example, lead byte characters, such as &H81 with no trailing byte, are translated to ANSI 0. While this limitation of the MSComm control does not allow binary data to be transmitted and received on DBCS systems, it does allow a standard "text" stream to be transferred. Q. Does the MSComm control (MSComm16.OCX and MSComm32.OCX) implement any of the popular binary transfer protocols? A. No. The MSComm control does not implement any binary transfer protocols like XModem/YModem, ZModem, or Compuserve B, for example. You would have to code these protocols yourself or purchase a third-party communication control that implements the desired protocols. Q. Can the MSComm control (MSComm16.OCX and MSComm32.OCX) accept byte arrays? A. The MSComm control does not accept byte arrays. This feature is under review and will be considered for inclusion in a future release. The MSComm control's Input and Output properties only work with Strings. Q. Can Unicode/ANSI conversion be disabled in the MSComm control (MSComm32.OCX)? A. Unicode/ANSI conversion can not be disabled in the MSComm control. This feature is under review and will be considered for inclusion in a future release. However, this feature would be unnecessary if the MSComm control would allow the use of byte arrays to transmit and receive binary data. (See question 4 above.) Q. Are the ComInput and ComOutput functions still available in the Visual Basic 4.0 MSComm control (MSComm16.OCX and MSComm32.OCX)? A. No. The ComInput and ComOutput functions are no longer available in the Visual Basic 4.0 MSComm control. Since NULLS can be transmitted or received properly, as long as the NullDiscard property is set to FALSE, and C programmers can access all of the properties and methods of the .OCX controls, there is no longer a need for these functions in the MSComm control. Q. Can the MSComm control (MSComm16.OCX and MSComm32.OCX) send binary data at a baud rate greater than 9600 baud? A. Yes. The MSComm control is capable of using baud rates up to and including 28,800 baud. Additional query words: 4.00 vb4win vb4all Comm
Keywords : kbcode PrgCtrlsCus |
Last Reviewed: May 12, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |