Solved

vb4 & MSComm & ComInput()

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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 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…
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…

762 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

18 Experts available now in Live!

Get 1:1 Help Now