ShellExecute() terminates the program execution

ShellExecute() terminates the program execution

Postby Euclides » Thu Sep 27, 2007 12:51 pm

Hi to all!
To call external programs (MSWord, Excel, Notepad, etc) in Windows XP,
I use ShellExecute() with no problems during the past years.
Lately in some machines, the FiveWin program just terminates in a ShellExecute() command line, with no error indications or logs at all.
If I reinstall the Windows XP, the problem disapears.
The customer gets very puzzled because only the FiveWin programs are affected.
In all cases, calling MSWord or Excel by OLE works normally.
Thanks in advance for sugestions.
Regards, Euclies
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Postby Otto » Thu Sep 27, 2007 5:34 pm

Have you tried winexec("test.exe")?

Regard
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Euclides » Fri Sep 28, 2007 1:25 pm

Yes Otto, you are right!
I stopped using all the waitrun & winexec some years before when started using ShellExecute in the Windows XP.
I changed all my ShellExec calls to winexec it works fine on my computer.
I am going to test it on the customer´s site.
Thanks
Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Postby Euclides » Thu Oct 04, 2007 2:28 pm

Hi to all,
Just to finish the post...
The WinExec worked in all XP machines who aborted the FiveWin program in the ShellExecute calls.
I had to do some strange things like:
WinExec("cmd /c start \"+GetCurDir()+"\mergeout.rtf")
but anyway... I di not reinstall the Windows again.
Regards, Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 8 guests