PRB: "Feature Not Available" Error from Stand-Alone .EXE File

Last reviewed: April 29, 1996
Article ID: Q90957
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

In a stand-alone executable file, when a macro substitution contains a FoxPro command or a command clause, a "Feature not available" error message occurs.

CAUSE

When FoxPro creates a stand-alone executable file, it scans the file for FoxPro commands in the project and places the necessary code in the file. When a macro substitution statement is executed, the code evaluates the variable and compiles and executes the command. If the variable contains a command or part of a command, the necessary code may not be available in the executable file.

RESOLUTION

Create another program or procedure in the project that contains the possible combinations of FoxPro commands that the application can create through macro substitutions. Even though this program or procedure is never called, its presence forces FoxPro to include in the .EXE file all the code required to run the macro substitution commands.

MORE INFORMATION

The following code example demonstrates this error. Because the code does not explicitly issue the PACK command, FoxPro does not include the required code in the stand-alone .EXE file; therefore, an attempt to run the PACK command from the macro substitution fails.

   testcom="pack"
   &testcom

To use the PACK command in a stand-alone .EXE file, create a procedure like the following and include it in the project:

   procedure addon
   pack
   return


Additional reference words: FoxWin FoxDos 2.00 2.50 2.50a
standalone errmsg
err
msg
KBCategory: kbprg kberrmsg kbprb
KBSubcategory: FxprgMacrosub


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.