Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute a VFP program and then execute another program
Message
From
14/07/2000 18:12:16
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00392654
Message ID:
00392728
Views:
8
>Well, when VFP exits, any memory variables exit with them. I guess I better re-state my problem.
>
>I was tasked to provide a login front end for an application written mainly in C. (MatLab) In addition I will be furnishing a database and tables which the C program will be accessing via ODBC - our test found this to be really speedy. Now What I want to do is to use the Login front end to do the user validation and then exit, and place a call to the c program, and passing a validation parameter, if possible. Once the C program starts running, there will be no return to the VFP front end.
>The RUN /N command doesn't like dealing with parameters. I am fiddling with _shellexecute() at the moment.
>The options as I see them are:
>1. Set a MSDOS environment variable.
>2. Write a temp file with the validation code.
>3. Pass a startup parameter to the called executable. (FoxPro is giving an error message here)
>4. Rewrite the front end in C++ (not an attractive option for me.)
>
>this is probably really very simple and straight forward, however I have been banging my head against the wall for a week.
>
>that help?

In the Files section, Ed Rauh has provided a class called API_APPRun, which is able to start other Windows programs from within VFP. One option is to start another program and have VFP continue to run without worrying about the status of the started program (asynchronous call).

You could use this to have VFP start the C executable, with appropriate parameters, then exit, leaving the C program running.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform