msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB6's MSComm doesn't work well with Vista

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
Wyne



Joined: 04 Oct 2007
Posts: 28

PostPosted: Wed Aug 29, 2007 9:48 am    Post subject: VB6's MSComm doesn't work well with Vista Reply with quote

Hi,

I have an application made using VB6. This App uses MSComm to control Serial
Port. It works well with Win9x, 2000, NT and XP. But when it is installed
into a Vista machine, sometimes OK, sometimes not. In the latter case, I
always got a Runtime Error '8020'.

I wonder whether VB6's MSComm control is compatible with Vista. When
searching the internet, I find many this complaints.

If they are, unfortunately, uncompatible, where can I get the update or fix?
(I have to stay with VB6, not to VB.Net, beause this App has already a big
user base, and transfer its codes to VB.Net is not feasiable.) I need a
resolution, please help.


Thank in advance.

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Ken Halter



Joined: 04 Oct 2007
Posts: 4150

PostPosted: Wed Aug 29, 2007 11:09 am    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

"Wyne" wrote in message @microsoft.com...
> Hi,
>
> I have an application made using VB6. This App uses MSComm to control
> Serial
> Port. It works well with Win9x, 2000, NT and XP. But when it is installed
> into a Vista machine, sometimes OK, sometimes not. In the latter case, I
> always got a Runtime Error '8020'.
>
> I wonder whether VB6's MSComm control is compatible with Vista. When
> searching the internet, I find many this complaints.
>
> If they are, unfortunately, uncompatible, where can I get the update or
> fix?
> (I have to stay with VB6, not to VB.Net, beause this App has already a big
> user base, and transfer its codes to VB.Net is not feasiable.) I need a
> resolution, please help.
>
>
> Thank in advance.

Check for updates for your serial drivers...

PRB: MSComm.Input Returns comReadError (8020) with Some Serial Ports
http://support.microsoft.com/kb/318784

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Back to top
View user's profile Send private message
Wyne



Joined: 04 Oct 2007
Posts: 28

PostPosted: Wed Aug 29, 2007 12:26 pm    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

Thank you, Ken.

Based on the information, I guess that if I use API calling, instead of
employing MSComm, to implement the Serial Port functions in my VB App, the
'8020 error' problem should be avoided. Is it right?

"Ken Halter" wrote:

> "Wyne" wrote in message
> @microsoft.com...
> > Hi,
> >
> > I have an application made using VB6. This App uses MSComm to control
> > Serial
> > Port. It works well with Win9x, 2000, NT and XP. But when it is installed
> > into a Vista machine, sometimes OK, sometimes not. In the latter case, I
> > always got a Runtime Error '8020'.
> >
> > I wonder whether VB6's MSComm control is compatible with Vista. When
> > searching the internet, I find many this complaints.
> >
> > If they are, unfortunately, uncompatible, where can I get the update or
> > fix?
> > (I have to stay with VB6, not to VB.Net, beause this App has already a big
> > user base, and transfer its codes to VB.Net is not feasiable.) I need a
> > resolution, please help.
> >
> >
> > Thank in advance.
>
> Check for updates for your serial drivers...
>
> PRB: MSComm.Input Returns comReadError (8020) with Some Serial Ports
> http://support.microsoft.com/kb/318784
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> In Loving Memory - http://www.vbsight.com/Remembrance.htm
>
>
>
Back to top
View user's profile Send private message
Dick Grier



Joined: 04 Oct 2007
Posts: 238

PostPosted: Wed Aug 29, 2007 1:37 pm    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

Hi,

Perhaps, but the API (under VB6) is limited to ASCII text data. If you want
to receive binary data you have to use MSComm or some other control (Sax
Comm Objects, for example).

This is a driver issue, not a bug with MSComm, IMO. Even using Visual
Studio .NET, there can be issues with buggy USB virtual serial port drivers,
and the built-in SerialPort object which uses the same APIs that you refer
to -- my DesktopSerialIO.dll for .NET is a little better, in some aspects
for .NET, with these devices.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Back to top
View user's profile Send private message
Wyne



Joined: 04 Oct 2007
Posts: 28

PostPosted: Wed Aug 29, 2007 1:36 pm    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

Thank you Dick.

I just download a "Hyperterminal" program from Internet and tried it. It
works OK!
Becuase teh same third-party virtual-port driver is used, so, I have question:

How can the Hyperterminal program to avoid my problem?

According to you, even the API method may encounter the problem. Likely, the
Hyperterminal program is created usingC language. But underlying, it still
call the same Windows drivers as API method.



"Dick Grier" wrote:

> Hi,
>
> Perhaps, but the API (under VB6) is limited to ASCII text data. If you want
> to receive binary data you have to use MSComm or some other control (Sax
> Comm Objects, for example).
>
> This is a driver issue, not a bug with MSComm, IMO. Even using Visual
> Studio .NET, there can be issues with buggy USB virtual serial port drivers,
> and the built-in SerialPort object which uses the same APIs that you refer
> to -- my DesktopSerialIO.dll for .NET is a little better, in some aspects
> for .NET, with these devices.
>
> Dick
>
> --
> Richard Grier, MVP
> Hard & Software
> Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
> Edition,
> ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
> 2006.
> See www.hardandsoftware.net for details and contact information.
>
>
>
Back to top
View user's profile Send private message
Dick Grier



Joined: 04 Oct 2007
Posts: 238

PostPosted: Thu Aug 30, 2007 2:23 pm    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

Hi,

Actually, HyperTerminal does not use the same APIs as MSComm (CreateFile,
ReadFile, WriteFile, etc.). They use ones for TAPI and some networking
APIs. These are available only through C/C++ (or .NET languages, including
VB).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Back to top
View user's profile Send private message
Robin James



Joined: 27 Feb 2008
Posts: 1

PostPosted: Wed Feb 27, 2008 2:05 pm    Post subject: Re: VB6's MSComm doesn't work well with Vista Reply with quote

Anyone having problems accessing com ports with Vista through VB6, get
SuperCom 6 RS232 ActiveX from www.adontec.com. Easy to integrate and works
well with Startech USB to RS232 adapters.

"Dick Grier" wrote:

> Hi,
>
> Actually, HyperTerminal does not use the same APIs as MSComm (CreateFile,
> ReadFile, WriteFile, etc.). They use ones for TAPI and some networking
> APIs. These are available only through C/C++ (or .NET languages, including
> VB).
>
> Dick
>
> --
> Richard Grier, MVP
> Hard & Software
> Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
> Edition,
> ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
> 2006.
> See www.hardandsoftware.net for details and contact information.
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
how to make .ocx work in vista Installed a VB6 application on a vista machine with admin rights. When a uer tried to use data entry form with tab control he got an error message "Component or one of its dependencies not corretly registed: a file is missing or invalid". S

VB6 on Vista some references doesnt work Is there a solution for this? /Regards Anders MCSD VS6, MCAD VB.Net

Does the VB6 CommonDialog work (compiled on Win98se) work on I have a program that uses a common dialog control that works great on win98/XP but gives this error on Vista: component comdlg32.ocx or one of its dependices is not correct. the file is missing or invalid. Can the common dialog control work on Vista or d

Scanners - MSComm My experience with scanners with VB is minimal. Someone else may explain what I think is quite wierd. What I am trying to do is pass a MSComm.Input value to a variable (I've tried string and variant type) before I do other stuff with the value. Code th

MsComm Object I am trying to add a scanner to an existing program which reads scales and adds production counts to various files. Shouldn't I be able to add the following code and expect the scanner to fill txtScan.Text with the Scanner info? Private Sub MSComm1_OnCom
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group