Now everything works fine.
In the first verion of MyApp.exe I call the ShellExecute with :
hndWin = 0
cAction = "open"
cFileName = "c:\mydir\myapps\mychild.exe"
cParams = ""
cDir = ""
nShowWin = 3
After your suggest, I changed the call to ShellExecute like this :
hndWin = 0
cAction = "open"
cFileName = "mychild.exe"
cParams = ""
cDir = "c:\mydir\myapps"
nShowWin = 3
In the first example the default directory is included in the name of the executable to run, and the default directory parameter is left empty.
In the second one, the name of the executable and the name of the default directory are specified using two different parameter. The second example works fine.
So, all the problems seems to be related to the cDir parameter, but only in the compiled version of the application. That is quite strange.
The same, exactly the same, happens using (as posted by Anatoliy) the WinExecute API.
Thank you all for help!
Nando
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement