Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem running FPD in Win 2K when compiled to exe

Status
Not open for further replies.

robrts

Programmer
Aug 26, 2002
28
US
This is an interesting problem that I have never run into before.

I am supporting a company that has numerous applications written in FPD 2.5b. Because of licensing issues they must compile all the apps that were run using the command line FOXPROX Main.app.

This application is basically a menu system that provides the users with a list of other applications they can run based on security and their job description.

When compile to .apps this works correctly, but when I compile them to .exe's I start getting an error message that says "Feature Not Available". This occurs on any of the sub-applications whenver they do any type of memory usage. The first happened when a Copy to Array line was executed. I changed that line to load the array differently and that worked, but it then gave me the same "Feature Not Available" error when doing a Scatter Memvar Blank.

I know that in FPD 2.5 and 2.6 you could run multiple .exe's as part of an application, but I do not know if this is a WIN2K issue or other.

I know that this is not a problem with "suspend" or "set step on" or any other debugging tools.



Any Thoughts??

Robert
 
I know you said 'this is not a problem with "suspend" or "set step on"', but are you sure there is no ON ERROR routine that is making those calls? Do you have an MVCOUNT setting in your config.fp?
Dave S.
 
Yes I'm sure about the Suspend and set step etc. in the On error condition. Yes there is a MVCount in the config.fp
 
Then how about macro substitution. I hate doing this but here is a chunk of verbage from the MSDN:

The main causes for the "Feature not available" error message are listed below:


1. Use of commands that require the execution and compilation of source code. These commands require the development version of FoxPro and therefore are not available in a distributed .APP or .EXE file.
Examples of these types of commands are BUILD APP, BUILD EXE, BUILD PROJECT, COMPILE, FILER, CREATE/MODIFY MENU, CREATE/MODIFY QUERY, CREATE/MODIFY SCREEN, SET VIEW ON, and SUSPEND.


2. Features specific to the interactive development environment of FoxPro, such as the Trace, Debug, Command, and View windows.

3. FoxPro menu commands available only in the development version. For the reasons mentioned above, many of the original FoxPro menu commands are not available for distribution. In addition, since there is no Command window in the Distribution Kit, any menu command that is echoed to the Command window is not available.
Menu commands that ARE available in a distributed .FXP, .APP, or .EXE file are listed below. This information can also be found in the "Features Not Available" section of the FoxPro Distribution Kit manual.


Menu Available commands
-----------------------------------------------------------

System About, Help, Calculator, Calendar/Diary,
Special Characters, ASCII Chart, Capture, Puzzle

File Close, Save, Save As, Revert

Edit All menu commands

Window Hide, Hide All, Show All, Clear, Move, Size,
Zoom, Cycle, and all the names of open windows

NOTE: For more information about how to list the names of open windows,
please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q97635
TITLE : How to List the Currently Active Windows in a Menu

No other menu options are available.



4. Commands containing macro substitution for the command verb in a stand- alone .EXE file. When a stand-alone .EXE file is being built, the programs are scanned for FoxPro commands. When commands are found, the code to execute these commands is built into the .EXE file. However, if there is macro substitution for the command verb in a line of code, that entire line is skipped, resulting in the code to execute that command not being built into the .EXE file. For example:


x="REPORT FORM test.frx"
&x PREVIEW

In this instance, the REPORT FORM... command would be skipped and the code to execute a REPORT FORM command would not be built into the .EXE file. To resolve this, include a "dummy" program in the project that never gets called, containing the following:



REPORT FORM test PREVIEW

This command contains no macro substitution; therefore, the code to execute the REPORT FORM command would be built into the .EXE file.


For more information about about this, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q133358


Dave S.
 
Tried that one this morning to no avail.

The problem only seems to occur on applications called from the main application. It only (so far) occurs when doing a copy to array or scatter memvar blank command.

The way I currently have gotten around this is to:
recompile all applications to stand alone extended.

Just prior to executing the called application save all global variables to a .mem file

Change the command line for the called application to a RUN command from DO command.

In the first line of the called program I restore the global variables, reset paths and then run.

When done I resave the global variables to the .mem file and then exit.

The main program then restores from the .mem file.


This is not the best approach as it requires compiling common functions into each of the applications. It could also be problematic if variables are not named correctly and they do not get saved to the .mem

On google I found a site that listed a number of kb articles that may relate. Unfortunately not all of them are still available on the MS site they are:

Q87698 PRB: "Feature Not Available" Error in Distribution Version
Q90957 PRB: "Feature Not Available" Error from Stand-Alone .EXE File
Q100569 PRB:"Feature Not Available" in 2.5/2.5a MS-DOS Stand-Alone EXE
Q104476 FIX: ADIR() and DISPLAY MEMORY Cause "Feature Not Available"
Q120288 FIX: "Feature Not Available" from FPD 2.6 Stand-Alone .EXE
Q152297 PRB: Calling APRINTERS Function Causes Feature Not Available

Thanks for the help so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top