Microsoft KB Archive/111671

{| = PRB: "API Library Not Found" in Low-Memory Situations =
 * width="100%"|

ID: Q111671

2.50b MACINTOSH kbinterop kbprg kbprb

The information in this article applies to:


 * Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS
When you are running BEAUTIFY.APP, the utility that helps you make cosmetic changes to the appearance of a program file, the following error message box appears:

API Library not found. The message box contains Cancel, Suspend, and Ignore push buttons. If you choose Ignore, the following error message appears: File 'fdbeautify.prg' does not exist. This message box contains Cancel, Suspend, and Ignore push bush buttons as well. If you choose Ignore, the original error message box appears.

CAUSE
There is not enough memory to load the API library that BEAUTIFY.APP references. An API library is a file that contains functions accessible to other programs. Many programs included with FoxPro for Macintosh, including BEAUTIFY.APP, use API libraries to perform tasks. The API libraries that come with FoxPro for Macintosh can be found in the System Folder:Extensions folder and end with the extension ".MLB".

RESOLUTION
If the above error occurs, it is best to choose Cancel. To clear the Beautification Options window that was left behind because the program was canceled, do the following:

1. From the Window menu, choose Command to gain access to the Command

window. 2. In the Command window, issue the following command: CLEAR WINDOWS To free more memory, try any or all of the following suggestions until the error does not recur:  If other applications are running in the background, save your work to disk and quit those applications. It should not be necessary to quit Microsoft FoxPro since the memory needed by the API library is allocated from the system heap. -or-  Quit Microsoft FoxPro, and reduce the Minimum and Preferred memory allocation for FoxPro. These settings are located in an application's Get Info dialog box; the procedure for altering them is described in the "Macintosh User's Guide" that comes with your Macintosh. NOTE: Reducing the amount of memory available to Microsoft FoxPro may have undesirable side-effects relating to other features of the product. Therefore, make note of the changes made regarding memory allocation in the Get Info dialog box. -or-   Reduce the amount of memory being used by the Macintosh system software. For specific information about how to make the following adjustments, see the "Macintosh User's Guide" included with the Macintosh. - If more than 8 MB of RAM are installed, make sure that 32-bit addressing is enabled. - Remove any unnecessary control panels or extensions (INITs) from the System Folder and restart the Macintosh. Do not remove the Shared Library Manager or FOXDOC.MLB from the Extensions folder. BEAUTIFY.APP requires these files in order to function properly. - Depending on what version of the Macintosh system software is     active, remove excess fonts from the System Suitcase or from the Fonts folder in the System Folder. Prior to System 7.1, fonts are stored in the System Suitcase. Also, remove any extra sounds from the System Suitcase. -or-  Install more physical memory (RAM).

For more information about managing memory on the Macintosh, see the appropriate sections in the "Macintosh User's Guide."

Steps to Reproduce Behavior
NOTE: It is easiest to reproduce this behavior on a Macintosh with 8 or fewer megabytes of RAM.

1. In the Finder, determine the amount of RAM available on the system by

choosing About The Macintosh from the Apple menu. From this information, make adjustments to the memory allocated to FoxPro. The goal is to  allocate all available memory in the system heap so that there is not enough free memory for the Shared Library Manager to load FOXDOC.MLB, the API library that BEAUTIFY.APP needs in order to function.

If, for example, there is a total of 8 MB available and the largest unused block is 5.7 MB, change the preferred allocation to FoxPro to  5600K. Memory allocation to applications is specified by selecting the application icon and choosing Get Info from the File menu. 2. Create a short program file such as the following: X=1 DO WHILE x<3 x=x+1 ENDDO 3. With the program file still open, choose Beautify from the Program menu. Additional reference words: FoxMac 2.50b ASLM errmsg err msg KBCategory: kbinterop kbprg kbprb KBSubcategory:

Keywords         : kberrmsg kbinterop kbprb kbprg Version          : 2.50b Platform         : MACINTOSH
 * }