Saturday, May 29, 2010

ShellExecute, WinExec failing in Delphi 2010/2009?

Here's a interesting store from which we can learn something, few days ago I've started upgrading projects from Delphi 7 to 2010, the transition was smooth enough, the Delphi team did a pretty good job in making this possible without too much complications, everything is fine until I was getting some errors from applications that where calling external application using ShellExecute/WinExec, I was getting errors from IDE but not if the application is ran without IDE, that's interesting, right?
How to fix it: press F6 from IDE, type "debug spawned" hit Enter(Return) key and un-check "Debug spawned processes", press OK and your done.
Easy huh? but still very problematic if your application depends on other being started and if the third party application is not started, then your application is responsible in starting it.

1 comment:

Blogroll(General programming and Delphi feeds)