Microsoft KB Archive/31933

= Compiled, CHAIN, &quot;Illegal Function Call&quot; Using LIBRARY =

Article ID: 31933

Article Last Modified on 11/21/2006



This article was previously published under Q31933



SUMMARY
When you CHAIN from one compiled program that uses the LIBRARY statement to a second compiled program, there is a case in which you get an &quot;Illegal Function Call&quot; when the same CHAIN works correctly in the interpreted version.

Within the interpreter, library routines opened with a LIBRARY statement are preserved across a CHAIN (unless you perform a LIBRARY CLOSE statement).

Unlike in the interpreter, the resource fork is always closed across a CHAIN in compiled programs. For compiled programs, the CHAINed program has to reinvoke the LIBRARY statement; otherwise, an &quot;Illegal Function Call&quot; (error 5) is generated when a routine from a LIBRARY file is invoked.

Additional query words: MQuickB

Keywords: KB31933

-

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

© Microsoft Corporation. All rights reserved.