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

ID: Q90957

2.00 2.50 2.50a | 2.50 2.50a

MS-DOS          | Windows
  kbprb

The information in this article applies to:

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:   kbprb
KBSubcategory: FxprgMacrosub
Keywords          : kberrmsg FxprgMacrosub 
Version           : 2.00 2.50 2.50a | 2.50 2.50a
Platform          : MS-DOS WINDOWS

Last Reviewed: May 22, 1998