Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't call a prg from inside an exe
Message
From
07/09/1999 13:42:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00262029
Message ID:
00262039
Views:
18
>>To benifit the user with the ability to do customized procedures on his data, I need to set up an add-on manager that will allow the user to register an external prg file and then run it from within the VFP. The problem is that VFP3's do command will not search anywhere except inside the exe. Is there a way to do this, or will all procedures have to be compiled into the exe?
>>
>>Thanks in advance...
>>
>>John Dennis
>
>Are you sure you can't? I don't have VFP3, but in VFP 5 or better you can do the following inside an exe:
>
>lcProgram = 'Test.Prg'
>DO (lcProgram)
>
>Provided that Test.Prg exists in the path the Exe is in, Test will run from the exe. Give it a try, HTH

Your code is almost exactly what I have in my vfp3 application. When I test it from the command line, it works (the prg is in the same folder as the exe) but when I run the exe I get "can't find test.prg". Reading the help on the do command in vfp3, the statement exists that "When you use DO to start a procedure in an executable version or in an application, Visual FoxPro searches only the main program of the executable version or application for the specified procedure." The application relies on an ocx graphics engine that is designed for vfp3 or I would compile it in vfp6 (if that would do the trick) but as it sits, I need a solution for the version 3 apps.

Thanks...

John Dennis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform