RavindraPatil


dear friends,

I want to know how is it possible to recieve a value from a standard exe file and store it  in a variable

e.g.

if "returnvalue.exe" file returns a number that is to be stored in a variable "mvalue". how to do it




Re: receive value returned by an exe

chanmy8


Hi,
AFAIK, you can't return value from EXE. What EXE returned is error code, which we couldn't do it with simple RETURN statement.

Is it VFP EXE If so, you can treat it as APP, call it using DO myexe TO myreturn. This would cause your "EXE" share the same process with your calling program.

HTH





Re: receive value returned by an exe

dni

You may try to run exe from vfp, but declare public the variable name (same variable name like in exe file).





Re: receive value returned by an exe

RavindraPatil

No it's not a VFP exe. it is exe created in vb.





Re: receive value returned by an exe

dni

You may try:

Pname is exe program created in vb.

XX is variable name to catch from vb exe. From vfp run:

PUBLIC XX
! Pname
XX