Microsoft KB Archive/76667

= BUG: CopyFile Fails w/ System Err 3 w/ Binary Mac QB 1.0b =

Article ID: 76667

Article Last Modified on 11/21/2006



This article was previously published under Q76667



SYMPTOMS
The following sample program, when compiled under the binary version of QuickBasic version 1.0b, will fail with a system bomb 3 (&quot;illegal instruction&quot;) when launched: INPUT &quot;Name of source file: &quot;, f1$ INPUT &quot;Name of destination file &quot;, f2$ CopyFile f1$, f2$     'Program fails on this statement. This problem only occurs for programs compiled using the binary version of QuickBasic version 1.0b. The problem does not occur when the program is run in the development environment of QuickBasic version 1.0, 1.0a or 1.0b for either the binary or decimal version. The problem does not occur when the program is compiled with the decimal version of QuickBasic version 1.0, 1.0a or 1.0b.

Microsoft has confirmed this to be a bug with Microsoft QuickBasic version 1.0b for the Macintosh. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
A workaround for the problem is to use ResEdit to copy the CopyFile MBLC routine from the decimal version of QuickBasic to the binary version. The program can be recompiled with the binary version and when run, the problem will no longer occur. Below are the steps to copy the CopyFile MBLC routine from the decimal version to the binary version:


 * 1) Launch ResEdit
 * 2) From the file list box, select the folder containing the decimal version of QuickBasic.
 * 3) Double-click on QuickBasic within the list to bring up the resource list box.
 * 4) From the resource list box, double-click on MBLC.
 * 5) Search for CopyFile ID=1200 within the list.
 * 6) Highlight the line including &quot;CopyFile ID=1200&quot;.
 * 7) From the Edit menu, choose Copy.
 * 8) Close the list box containing the list of MBLC routines and associated ID numbers.
 * 9) Close the resource list box.
 * 10) Double-click on the binary version of QuickBasic within the list box to bring up the resource list box.
 * 11) From the resource list box, double-click on MBLC to bring up the list box containing a list of the MBLC routines and associated ID numbers.
 * 12) From the Edit menu, choose Paste. The CopyFile routine should appear at the top of the list (out of alphabetical order), indicating that it was successfully copied.
 * 13) Close the list box.
 * 14) Close the resource list box.
 * 15) From the &quot;Save 'Microsoft QuickBasic (b)' before closing?&quot; dialog box, select Yes to save the changes.
 * 16) From the File menu, choose Quit to exit ResEdit.

Recompile the program using the binary version of QuickBasic. When the program is launched, the CopyFile routine should work as expected.

Additional query words: MQuickB 1.00b

Keywords: kbbug KB76667

-

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

© Microsoft Corporation. All rights reserved.