Question : Passing foxpro variable to Visual studio project

Hello Experts,

I am trying to create a simple application in visual studio but i need to get variable data from an ancient foxpro program. What i am looking to do is have the foxpro application run the Visual studio program and pass information to VS to manipulate. In Foxpro you can pass variables to dos windows but I lack understanding of how that works. Can anyone help?

Thank you,

John

Answer : Passing foxpro variable to Visual studio project

If this is visual foxpro, you can use shellexecute

DECLARE INTEGER ShellExecute IN shell32.DLL INTEGER hndWin, STRING cAction, ; STRING cFileName, STRING cParams, STRING cDir, INTEGER nShowWin
shellexecute(0,'Open',cExecutableFileWithFullPath,"YourParameters here","",1)

If it is Foxpro for DOS, you can create a .BAT file and then run it

lnHandle=FCREATE('temp.bat')
=FPUTS(lnHandle,'YourCommandWithParameter')
=FCLOSE(lnHandle)
Run temp.bat

Or you could try directly running it from foxpro
RUN YourExeFileWithPath YourParameters
Random Solutions  
 
programming4us programming4us