shell32 patch 17
Martin Fuchs
martin-fuchs at gmx.net
Wed Jan 21 14:26:38 CST 2004
Changelog:
- remove unnecessary function declaration (seems to be a copy&paste mistake)
- ISF_Desktop_fnGetUIObjectOf(): allow context menu on the desktop without any selected item
- ISF_Desktop_fnGetUIObjectOf(): preserve return error codes
- ISF_Desktop_fnGetDisplayNameOf(): optimization; don't initialize whole character array with zero, zero termination is enough.
Index: shfldr_desktop.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_desktop.c,v
retrieving revision 1.16
diff -u -p -d -r1.16 shfldr_desktop.c
--- shfldr_desktop.c 20 Jan 2004 01:37:24 -0000 1.16
+++ shfldr_desktop.c 21 Jan 2004 20:23:51 -0000
@@ -75,8 +75,6 @@ typedef struct {
#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl)
#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
-HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
-
static struct ICOM_VTABLE (IShellFolder2) vt_MCFldr_ShellFolder2;
static shvheader DesktopSFHeader[] = {
@@ -412,7 +410,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetU
if (ppvOut) {
*ppvOut = NULL;
- if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) {
+ if (IsEqualIID (riid, &IID_IContextMenu)) {
pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl);
hr = S_OK;
} else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {
@@ -439,7 +437,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetU
hr = E_NOINTERFACE;
}
- if (!pObj)
+ if (SUCCEEDED(hr) && !pObj)
hr = E_OUTOFMEMORY;
*ppvOut = pObj;
@@ -459,10 +457,12 @@ static HRESULT WINAPI ISF_Desktop_fnGetD
{
ICOM_THIS (IGenericSFImpl, iface);
- CHAR szPath[MAX_PATH] = "";
+ CHAR szPath[MAX_PATH];
GUID const *clsid;
HRESULT hr = S_OK;
+ *szPath = '\0';
+
TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet);
pdump (pidl);
More information about the wine-patches
mailing list