Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vb4 & MSComm & ComInput()

Posted on 1998-05-06
4
Medium Priority
?
379 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 100 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Suggested Courses

722 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