Microsoft KB Archive/46878

= Loading File with DOS Device Name (CON) Can Hang QuickBasic =

Article ID: 46878

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS

-



This article was previously published under Q46878



SUMMARY
Loading or saving files that have the same base name as a DOS device (e.g. COM1, AUX, CON, PRN, etc.) can cause the QB.EXE editor to hang for varying lengths of time. This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50 for MS-DOS.

With the QBX.EXE editor for Microsoft Basic PDS 7.00, the message &quot;Operation Requires Disk&quot; is displayed and returns you to the MS-DOS prompt when you try to load a file with a MS-DOS device name as the base filename from the QBX.EXE command line. When trying to load or save files from the File menu, QBX.EXE editor gives the message &quot;File already exists. Overwrite?&quot; If you answer yes to the prompt, the message &quot;Path/File access error&quot; is displayed.

To avoid hanging, or error messages, do not use DOS device names as base names for your files.



MORE INFORMATION
For example, trying to load a file in QB.EXE with the base name of &quot;comX&quot;, where &quot;X&quot; is the number of an installed serial port, causes the QuickBasic environment to hang for approximately one minute. Attempting to save a file named &quot;comX&quot; results in a longer delay and a &quot;Disk full&quot; error message. This occurs regardless of the extension of the base filename. &quot;COM1.BAS&quot;, for example, will cause the behavior.

QuickBasic attempts to access the DOS device &quot;comX&quot; and delays until the device times out. Similar results can occur when you use other device names. Using the DOS device name CON causes QuickBasic to hang. To avoid this, do not use the DOS device names as base names for your files.

Additional query words: QuickBas BasicCom

Keywords: KB46878

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.