Author: gadamopoulos
Date: Sat Mar 28 21:11:42 2015
New Revision: 66938
URL:
http://svn.reactos.org/svn/reactos?rev=66938&view=rev
Log:
[PSDK]
- Make IsEqualGUID typesafe for c++
[SHELL32]
- Properly call IsEqualIID in _ILIsControlPanel. Should fix CORE-8891.
Modified:
trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
trunk/reactos/include/psdk/guiddef.h
Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Sat Mar 28
21:11:42 2015
@@ -332,12 +332,12 @@
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;
}
Modified: trunk/reactos/include/psdk/guiddef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/guiddef.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/guiddef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/guiddef.h [iso-8859-1] Sat Mar 28 21:11:42 2015
@@ -126,7 +126,11 @@
((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) */