ShellView (IOleCommandTarget) fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The problem at the moment with our IOleCommandTarget::QueryStatus
implementation is that we don't do *anything* with the parameters passed in.
The docs say that we should clear the cmdID for each prgCmds to indicate
that we don't support it, otherwise Explorer calls Exec expecting it to
succeed. This patch also includes two cases of Exec that do succeed on
Windows, but I'm not sure what they mean (they don't seem to match the
OLECMDID_* defines in the headers).

ChangeLog:
- Clear bits in structure passed to IOleCommandTarget_QueryStatus to show
that we don't support any Exec's
- Add two Exec cases that were found during testing

Rob
Index: dlls/shell32/shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.73
diff -u -r1.73 shlview.c
--- dlls/shell32/shlview.c	8 Jan 2003 21:09:26 -0000	1.73
+++ dlls/shell32/shlview.c	19 Jan 2003 03:00:09 -0000
@@ -1932,11 +1937,20 @@
 	OLECMD * prgCmds,
 	OLECMDTEXT* pCmdText)
 {
-	_ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
+    int i;
+    _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
 
-	FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n",
+    FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n",
               This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText);
-	return E_NOTIMPL;
+
+    if (!prgCmds)
+        return E_POINTER;
+    for (i = 0; i < cCmds; i++)
+    {
+        FIXME("\tprgCmds[%d].cmdID = %ld\n", i, prgCmds[i].cmdID);
+        prgCmds[i].cmdf = 0;
+    }
+    return OLECMDERR_E_UNKNOWNGROUP;
 }
 
 /**********************************************************
@@ -1956,7 +1970,17 @@
 
 	FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n",
               This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut);
-	return E_NOTIMPL;
+
+	if (IsEqualIID(pguidCmdGroup, &CGID_Explorer) &&
+	   (nCmdID == 0x29) &&
+	   (nCmdexecopt == 4) && pvaOut)
+	   return S_OK;
+	if (IsEqualIID(pguidCmdGroup, &CGID_ShellDocView) &&
+	   (nCmdID == 9) &&
+	   (nCmdexecopt == 0))
+	   return 1;
+
+	return OLECMDERR_E_UNKNOWNGROUP;
 }
 
 static ICOM_VTABLE(IOleCommandTarget) ctvt =

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux