[PSDK]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 28 Mar 2015 21:11:42 +0000 (21:11 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 28 Mar 2015 21:11:42 +0000 (21:11 +0000)
- Make IsEqualGUID typesafe for c++

[SHELL32]
- Properly call IsEqualIID in _ILIsControlPanel. Should fix CORE-8891.

svn path=/trunk/; revision=66938

reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
reactos/include/psdk/guiddef.h

index c7b945c..e20d2e1 100644 (file)
@@ -332,12 +332,12 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
 
 static BOOL _ILIsControlPanel(LPCITEMIDLIST pidl)
 {
-    IID *iid = _ILGetGUIDPointer(pidl);
+    GUID *guid = _ILGetGUIDPointer(pidl);
 
     TRACE("(%p)\n", pidl);
 
-    if (iid)
-        return IsEqualIID(iid, CLSID_ControlPanel);
+    if (guid)
+        return IsEqualIID(*guid, CLSID_ControlPanel);
     return FALSE;
 }
 
index 22e532b..8e8b7c9 100644 (file)
@@ -126,7 +126,11 @@ __inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
         ((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2] &&
         ((unsigned long *) &rguid1)[3] == ((unsigned long *) &rguid2)[3]);
 }
-#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
+
+__inline int IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
+{
+    return !memcmp(&rguid1, &rguid2, sizeof(GUID));
+}
 
 #else /* defined(__cplusplus) && !defined(CINTERFACE) */