>Hi,
> Is there any way to pass and retrieve parameter from others application such as EXE compiled from VB?
>
You can accept command line parameters into a VFP executable by placing a PARAMETERS or LPARAMETERS statement at the beginning of your main program, and can pass command line parameters in a RUN command, or in an API invocation (ShellExecute(), ShellExecuteEx() and CreateProcess() all allow command line parameters to be passed in the API call.)
parameters passed via the command line to VFP will be received as strings; if you need to embed characters that might be treated as separator characters such as spaces or commas, you need to encapsulate the command line string in quotes (you must use the
" character to delimit strings on a command line.) You must allow for a maximum number of parameters explicitly in your main, and will have to parse and handle the parameters in the parameter variables received. Any command line parameter not filled will contain a logical .F., and you can test the number of parameters passed using PCOUNT(). parameters will be scoped as private for a PARAMETERS statement, and local with an LPARAMETERS statement.
VB can retrieve command line parameters with the COMMAND$ variable. VB does no parsing of the command line, and returns a single string that the program must parse and interpret itself.
>Thank you