Solved

vb4 & MSComm & ComInput()

Posted on 1998-05-06
4
375 Views
Last Modified: 2008-02-01
I've reinstalled the MSCOMM32.OCX from the VB4 CDROM!
Reference Manual & VBonline both state that MSComm.input
only reads upto a NULL byte SO to read everything use
subroutine bytes-read = ComInput(hwnd,buffer,buffer-len)
I can't get this to work!  It complains it can't find sub
ComInput().  I need an example that WORKS in VB4 that I can
cut and paste.

PS I'm running low on points! How do I get more?
0
Comment
Question by:mgrossman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 50 total points
ID: 1442224
mgrossman,
The ComInput function is no longer available for VB4.
Check out the MSKB artical:
http://support.microsoft.com/support/kb/articles/q151/8/99.asp
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.

You can purchase additional points from EE.

If you have questions, You can email me Dalin_N@MAilExcite.Com.
I have done a lot of instrument control with with MSComm in the past 5 years.
Regards
Dalin
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1442225
Martin,
I replied to your e-mail and this is the delivery report.
Sorry
Dalin

This is a collection of reports about email delivery
process concerning a message you originated:

<smtp BBN.COM grossman@BBN.COM 60001>: ...\
        <<- MAIL From:<dalin_n@mailexcite.com> BODY=8BITMIME SIZE=2353
        ->> 571 <dalin_n@mailexcite.com>... This domain is banned.go away


0
 

Author Comment

by:mgrossman
ID: 1442226
Dalin,

  I double checked the VB4.0 Reference Manual this morning
pertaining to ComInput, and ComOutput.  The only thing in either
that mentions VB1.0 is that MSComm.Output will only output till
first null byte so you must use ComOutput() to output null bytes.

1) That has not been a problem for me since in VB4.0 the .Output
   does send null bytes OK!
2) After hours testing last night I finaly got input of NULL
   bytes.  I added code to do the following:
for i = 1 to len(input-string)
 debug.print asc(mid$(input-string,i,1))
next i
   I did not see any null bytes but I did see alot of "?". BUT
   that stands for parity errors, and the OnComm() event routine
   is not getting any parity errors, so I changed the parity
   replace character to ".", and now my input buf has lots of
   ".". SO, acording to the manual I changed the parity replace
   char to "" (ie nothing) which the man sais will ignore parity
   errors (settings have always been 4800,N,8,1) which shouldnt
   ever get parity errors anyways.  Well, now instead of "?",
   or "." I'm getting all the NULL bytes!!!!!!!!!!!!!!!!!

PS its not just the "?" were replacing the null bytes, but the
   actual replacement of the null with "?" was causing anywhere
   from 2 to 5 bytes to actualy be lost!!!!!! and never reported
   via overflows of underflows or frame errors or any error
   condition!

SO, Now it looks like everything is working fine!

PS Looks like mailexcite.com is stopping you from directly
   sending email, don't know why so check with them.

PS My email hasn't changed in 20 years and is always working
"grossman@bbn.com"

0
 
LVL 9

Expert Comment

by:Dalin
ID: 1442227
martin,
Congradulations on getting everything working!
I did not use the two functions before, since Microsoft says it was not available.

With regarding to the e-mail, I have never get that kind of report before. "Banned.Go way"?  I don't understand.

Regards
Dalin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month4 days, left to enroll

630 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