I've got three examples which can attend these proposes or even serve as examples.
Please note which is in Demo2.rc file contains.

I hope you enjoy it and all your contributions are welcome.

However, with respect to ShellExecuteEx, I would like to replace the file execution in the same way by a process which would it prevent the recursive method...

I used the recursive method to avoid creating another executable. So I use the same parameter to differentiate its execution from within the same application.
Has anyone done anything similar with processes without having to create an executable ?
Would it work with __pp_Process (ShellExecuteEx run with Harbour's PreProcesor) ?