accessing a function result of one app from another app

Hi Experts,
I have two delphi apps say app1 and app2,  both are exes.
I run one app2 from app1 by shellexecute command.
How can i pass a function of app1 inside shellexecute command so the function result is available to app2.
Who is Participating?
Sinisa VukConnect With a Mentor Commented:
your first app can set ExitCode integer value:
procedure TForm1.Button1Click(Sender: TObject);
  ExitCode := 999;

Open in new window

...second will check result which will return upon call of win api function CreateProcess.
Few examples how to run second process are here...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.