Re: Delphi: Shellexecute error

Posted by webmaster Guido on December 04, 2003
In reply to: Shellexecute error posted by Szeltan on November 22, 2003

: Hi!
: I'd only like to know what error did I get under errorcode 2 in shellexecute?
-------------


If the ShellExecute function fails, it returns an integer value that is less than or equal to 32. Here are some error values:

0 Operating system is out of memory
2 File not found
3 Path not found
11 Bad file format
31 No application found that's associated with the given filename extension

For a complete list of predefined constants that can be used to compare the return value of ShellExecute, see (put it all on one line):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp

Note: the DelphiLand section Code Snips contains an article plus demo about the use of ShellExecute; look under "Running an external application".


Find related articles

Search for:  shellexecute


Delphi Forum :: Tutorials :: Source code :: Tips