VB6, MSComm, and working in BINARY mode.

Posted on 2007-07-19
Last Modified: 2013-12-26
I am using VB6 and the MSComm control.
I have written several programs using the above and they are working OK. So I'm not a beginner to the concepts :>

I am working with a device that I can communicate to using  RS232.  The way it works is this

Send a REQ
Get and ACK
Send a Get Data request
Data is recieved in 8 blocks of 128 characters. I send an REQ after each 128 block.

The difficulty I am having is that sometime I get only hald of the data. I suspect that because I am using  the TEXT mode I am getting a character that is blocking transmission (Likie and EOF, Cntrl Z, or something like that)

I would like to try working in BINARY mode however I can find little information about that. Does anyone have some example on this which shows  how I processes that data coming in in the MSComm event routine. After recieving I will still need to deal with the data as strings for comparisons.

Many thanks
Question by:CVSmarc
    1 Comment
    LVL 13

    Accepted Solution


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now