Solved

vb4 & MSComm & ComInput()

Posted on 1998-05-06
4
371 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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