wxExecute fails after wxFileType::GetOpenCommand on Windows
|Reported by:||houchins@…||Owned by:|
|Keywords:||DDE GetOpenCommand wxExecute||Cc:|
My app is calling wxFileType::GetOpenCommand() to get a command string to open an html file. The subsequent wxExecute fails on Windows 7 because the returned command string has WX_DDE specifiers in it that are incomplete and thus not parsed properly by wxExecute.
The problem occurs in src/msw/mimetype.cpp when no DDE command is specified in the Windows registry. (DDE may be obsolete in newer Windows systems, but does exist in XP). Specifically, the key "HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec" does not contain a Default value (it is empty). The wxWidgets code in GetCommand() does not check for an empty 'ddeexec' string, and thus what is returned is malformed causing the error.
I have a patch which simply checks for an empty DDECommand string and bypasses adding DDE specifiers to the command if so.