Microsoft KB Archive/47752

= FIX: QuickBasic CopyFile Routine May Return Bad Error Code =

Article ID: 47752

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q47752



SYMPTOMS
The CopyFile routine (an MBLC) supplied with Microsoft QuickBasic versions 1.0 and 1.0a for the Macintosh returns incorrect error codes in some cases.

Microsoft has confirmed this to be a bug in QuickBasic versions 1.0 and 1.0a. This problem is corrected in QuickBasic version 1.0b.



MORE INFORMATION
The following is a list of CopyFile error messages that Microsoft has confirmed to be incorrect:   Incorrect CopyFile Error     Correct Error -

57 Device I/O error         61 Disk Full 53 File not found           70 Disk write-protected 5 Invalid function call    74 Unknown disk name Any CopyFile operation that should produce one of these correct errors instead displays the corresponding incorrect error message.

How to Use CopyFile
The syntax of the CopyFile command is the following:   CopyFile &quot;file&quot;, &quot;destination file&quot; CopyFile is useful because it copies both the data and resource forks of a file to a destination file. CopyFile is documented only in the README file on the QuickBasic 1.0 release disk (not in the manual).

If an error occurs during CopyFile, the file that was being created stays open. If the disk containing the CopyFile's destination file is ejected after an error occurs, the disk icon is still displayed. This is because the system keeps track of the open file. To remove the disk icon from the screen, run another application or reboot. When that application is finished running, the disk icon is gone.

CopyFile copies files correctly if an error is not encountered. If you check for the possible errors before you use CopyFile, you guarantee CopyFile's success. Those errors are listed on page 559 of &quot;Microsoft QuickBasic for Macintosh : Language Reference.&quot;

Additional query words: MQuickB 1.00 1.00a 1.00b

Keywords: kbbug kbfix KB47752

-

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

© Microsoft Corporation. All rights reserved.