Solved

chr$(0) does not get transmitted(modem)

Posted on 2002-06-24
3
172 Views
Last Modified: 2010-05-02
Hi,
I've found that chr$(0) does not get transmitted over the modem using microsoft's newvbterm.exe or any other such programs.HELP!
0
Comment
Question by:sudeepn
3 Comments
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
ID: 7107610
NULLs DO get transmitted and other non-printables. It just depends how the program (NEWVBTERM and so on) is handling the data. NULLs can be used a string terminators (as per C) so you may have to use the MSCOMM control and code it yourself. Out of interest, check out the help for Nulldiscard and InputMode. This code fragment may help as well:

   With comPort
      .Handshaking = comNone
      .InputMode = comInputModeText
      .CommPort = 2
      .Settings = "1200,E,8,1"
      .InputLen = 0            ' Tell the control to read entire buffer when Input
                               ' is used.
      .PortOpen = True         ' Open the port.
      .InputLen = 0            ' Read all of the text
      .RThreshold = 1          ' Interrupt every character
   End With

   Dim Temp As Variant ' Do not use a byte array as this intersperses NULLs
   Dim Text As String

   Text = "Hello" & Chr$(0) & " World"
   ' Send the message
   Temp = Text
           
   comPort.Output = Temp

This should work - it's from our crane handling system.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7962965
Hi sudeepn,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept PNJ's comment(s) as an answer.

sudeepn, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8038970
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

773 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