Daily Archive for July 12th, 2006

Why to avoid ShellExecute!

ShellExecute() is a silly function. It still exists to allow for backwards compatibility with Systems before Windows 95. It is ridiculous to use it, while another function with a superset of functionality exists already: ShellExecuteEx(). To name just the biggest disadvantage of ShellExecute(): it prevents proper localization. The error messages are given in English only, while any error message should be shown to the user in the system’s language. Furthermore this function does not allow to map to system error codes (those you could determine via GetLastError()). As I mentioned, it’s just silly. Continue reading ‘Why to avoid ShellExecute!’