|
| Author |
Message |
Wyne
Joined: 04 Oct 2007 Posts: 28
|
Posted: Wed Aug 29, 2007 9:48 am Post subject: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
Ken Halter
Joined: 04 Oct 2007 Posts: 4150
|
Posted: Wed Aug 29, 2007 11:09 am Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
"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 |
|
 |
Wyne
Joined: 04 Oct 2007 Posts: 28
|
Posted: Wed Aug 29, 2007 12:26 pm Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
Dick Grier
Joined: 04 Oct 2007 Posts: 238
|
Posted: Wed Aug 29, 2007 1:37 pm Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
Wyne
Joined: 04 Oct 2007 Posts: 28
|
Posted: Wed Aug 29, 2007 1:36 pm Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
Dick Grier
Joined: 04 Oct 2007 Posts: 238
|
Posted: Thu Aug 30, 2007 2:23 pm Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
Robin James
Joined: 27 Feb 2008 Posts: 1
|
Posted: Wed Feb 27, 2008 2:05 pm Post subject: Re: VB6's MSComm doesn't work well with Vista |
|
|
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 |
|
 |
|
|