Link to home
Start Free TrialLog in
Avatar of mgrossman
mgrossman

asked on

vb4 & MSComm & ComInput()

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?
ASKER CERTIFIED SOLUTION
Avatar of Dalin
Dalin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dalin
Dalin

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


Avatar of mgrossman

ASKER

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"

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