Can someone tell me the possible causes of the error I have?
I have the error 8021 (Application-defined or object-defined error) in a Sub
that contains the line
FrmMain.MSComm1.Output = (Q$)
where Q$ is a string we send on Com1. It contains some other lines, but it
only assign a variable to the value 5 and set an Image visible and another
image invisible.
In the current circumstance, I suppose the error 8021 is caused by MSComm
control. The description of the error 8021 for MSComm control is "Internal
error retrieving device control block for the port".
So what could be the causes of this "Internal error retrieving device
control block for the port"?
Note: The error happens on our client's computer but we can't reproduce the
trouble on our computer and it seems to work properly here. I use Visual
Basic 6.0.
Thank you!

Signature
My E-mail: rinouellotravail@globetrotter.net
Ken Halter - 24 Aug 2004 20:31 GMT
Please CROSSPOST instead of MULTIPOSTing. That way, all answers show in
all groups in the list instead of having a separate set of answers in
each group.

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..
rcc - 25 Aug 2004 17:06 GMT
With that information it's hard to say. ComDCBError happens when windows
can't read the port state.
First, make sure it is open:
MSComm1.PortOpen = True
Catch any excpetions here. Also don't foget to close it in the end, by
setting it to False. Next, check the port settings. It could be caused
by an unsupported baud rate.
I usually test the settings in HyperTerminal first and only then use
them in the application.
This URL may also help: http://www.mev.co.uk/vbbaud.htm
# rcc
Dick Grier - 25 Aug 2004 19:29 GMT
Hi,
The only time that I have heard of this error was associated with a faulty
USB serial converter device driver. A driver update was required from the
USB device manufacturer. Other virtual serial port devices might cause a
similar problem (requiring a similar solution).
Dick

Signature
Richard Grier (Microsoft Visual Basic MVP)
See www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Rino Ouellet - 25 Aug 2004 23:24 GMT
I forgot to tell you the following details:
-The word client, here, means a person which is a client of our company.
-I use : Windows 2000 Professionnal Service Pack 4 (to develop the
application using Visual Basic 6.0 Professional Edition)
-Our client use : Windows XP (to run the .exe I made with Visual Basic)
Thank you for your answers