Ignore DdeClientTransaction error in ShellExecute
Dmitry Timoshkov
dmitry at baikal.ru
Fri Jun 11 02:21:27 CDT 2004
Hello,
It's documented in the KB 330337 that IE has a bug and returns error
DMLERR_NOTPROCESSED on XTYP_EXECUTE request. Since ShellExecute under
Windows does not return error it seems that it simply either does not
check return value of DdeClientTransaction or just ignores the error.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Ignore DdeClientTransaction error in ShellExecute.
--- cvs/hq/wine/dlls/shell32/shlexec.c Tue Apr 27 01:25:40 2004
+++ wine/dlls/shell32/shlexec.c Fri Jun 11 07:11:20 2004
@@ -743,6 +743,7 @@ static unsigned dde_connect(WCHAR* key,
DWORD tid;
HSZ hszApp, hszTopic;
HCONV hConv;
+ HDDEDATA hDdeData;
unsigned ret = 31;
strcpyW(endkey, wApplication);
@@ -800,8 +801,17 @@ static unsigned dde_connect(WCHAR* key,
SHELL_ArgifyW(res, sizeof(res)/sizeof(WCHAR), exec, lpFile, pidl, szCommandline);
TRACE("%s %s => %s\n", debugstr_w(exec), debugstr_w(lpFile), debugstr_w(res));
- ret = (DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0,
- XTYP_EXECUTE, 10000, &tid) == 0) ? 31 : 33;
+ /* It's documented in the KB 330337 that IE has a bug and returns
+ * error DMLERR_NOTPROCESSED on XTYP_EXECUTE request.
+ */
+ hDdeData = DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0,
+ XTYP_EXECUTE, 10000, &tid);
+ if (hDdeData)
+ DdeFreeDataHandle(hDdeData);
+ else
+ WARN("DdeClientTransaction failed with error %04x\n", DdeGetLastError(ddeInst));
+ ret = 33;
+
DdeDisconnect(hConv);
error:
More information about the wine-patches
mailing list