Author: tfaber
Date: Mon Oct 19 15:28:24 2015
New Revision: 69621
URL:
http://svn.reactos.org/svn/reactos?rev=69621&view=rev
Log:
[PSDK]
- Add missing shlobj.h changes from the previous commit
- Correctly define ITEMIDLIST types, and add initial support for STRICT_TYPED_ITEMIDS
CORE-8441 #resolve
Modified:
trunk/reactos/include/psdk/shlobj.h
trunk/reactos/include/psdk/shtypes.idl
Modified: trunk/reactos/include/psdk/shlobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlobj.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/shlobj.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shlobj.h [iso-8859-1] Mon Oct 19 15:28:24 2015
@@ -2139,10 +2139,10 @@
{
HWND hwnd;
IContextMenuCB *pcmcb;
- LPCITEMIDLIST pidlFolder;
+ PCIDLIST_ABSOLUTE pidlFolder;
IShellFolder *psf;
UINT cidl;
- LPCITEMIDLIST* apidl;
+ PCUITEMID_CHILD_ARRAY apidl;
IUnknown *punkAssociationInfo;
UINT cKeys;
const HKEY *aKeys;
@@ -2167,10 +2167,10 @@
HRESULT
WINAPI
CDefFolderMenu_Create2(
- _In_opt_ LPCITEMIDLIST,
+ _In_opt_ PCIDLIST_ABSOLUTE,
_In_opt_ HWND,
UINT cidl,
- _In_reads_opt_(cidl) LPCITEMIDLIST*,
+ _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY,
_In_opt_ IShellFolder*,
_In_opt_ LPFNDFMCALLBACK,
UINT nKeys,
@@ -2190,9 +2190,9 @@
*/
HRESULT WINAPI SHCreateDataObject(
- _In_opt_ LPCITEMIDLIST pidlFolder,
+ _In_opt_ PCIDLIST_ABSOLUTE pidlFolder,
_In_ UINT cidl,
- _In_reads_opt_(cidl) LPCITEMIDLIST* apidl,
+ _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY apidl,
_In_opt_ IDataObject *pdtInner,
_In_ REFIID riid,
_Outptr_ void **ppv);
@@ -2202,9 +2202,9 @@
*/
HRESULT WINAPI CIDLData_CreateFromIDArray(
- _In_ LPCITEMIDLIST pidlFolder,
+ _In_ PCIDLIST_ABSOLUTE pidlFolder,
_In_ UINT cidl,
- _In_reads_opt_(cidl) LPCITEMIDLIST* apidl,
+ _In_reads_opt_(cidl) PCUIDLIST_RELATIVE_ARRAY apidl,
_Outptr_ IDataObject **ppdtobj);
/****************************************************************************
Modified: trunk/reactos/include/psdk/shtypes.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shtypes.idl?r…
==============================================================================
--- trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] Mon Oct 19 15:28:24 2015
@@ -32,16 +32,44 @@
typedef struct _ITEMIDLIST
{
SHITEMID mkid; /* first itemid in list */
-} ITEMIDLIST,*LPITEMIDLIST;
-typedef const ITEMIDLIST *LPCITEMIDLIST;
-typedef LPITEMIDLIST PITEMID_CHILD;
-typedef LPCITEMIDLIST PCITEMID_CHILD;
-typedef LPCITEMIDLIST PCUITEMID_CHILD;
-typedef LPCITEMIDLIST *PCUITEMID_CHILD_ARRAY;
-typedef LPITEMIDLIST PIDLIST_RELATIVE;
-typedef LPCITEMIDLIST PCUIDLIST_RELATIVE;
-typedef LPITEMIDLIST PIDLIST_ABSOLUTE;
-typedef LPCITEMIDLIST PCIDLIST_ABSOLUTE;
+} ITEMIDLIST;
+
+#ifndef UNALIGNED
+#define UNALIGNED
+#endif
+
+typedef ITEMIDLIST UNALIGNED *LPITEMIDLIST;
+typedef const ITEMIDLIST UNALIGNED *LPCITEMIDLIST;
+
+cpp_quote("#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)")
+cpp_quote("typedef struct _ITEMIDLIST_RELATIVE : public ITEMIDLIST { }
ITEMIDLIST_RELATIVE;")
+cpp_quote("typedef struct _ITEMIDLIST_ABSOLUTE : public ITEMIDLIST_RELATIVE { }
ITEMIDLIST_ABSOLUTE;")
+cpp_quote("typedef struct _ITEMID_CHILD : public ITEMIDLIST_RELATIVE { }
ITEMID_CHILD;")
+cpp_quote("#else")
+typedef ITEMIDLIST ITEMIDLIST_RELATIVE;
+typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;
+typedef ITEMIDLIST ITEMID_CHILD;
+cpp_quote("#endif")
+
+typedef ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;
+typedef ITEMIDLIST_RELATIVE UNALIGNED *PUIDLIST_RELATIVE;
+typedef const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;
+typedef const ITEMIDLIST_RELATIVE UNALIGNED *PCUIDLIST_RELATIVE;
+typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;
+
+typedef ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;
+typedef ITEMIDLIST_ABSOLUTE UNALIGNED *PUIDLIST_ABSOLUTE;
+typedef const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;
+typedef const ITEMIDLIST_ABSOLUTE UNALIGNED *PCUIDLIST_ABSOLUTE;
+typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;
+typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;
+
+typedef ITEMID_CHILD *PITEMID_CHILD;
+typedef ITEMID_CHILD UNALIGNED *PUITEMID_CHILD;
+typedef const ITEMID_CHILD *PCITEMID_CHILD;
+typedef const ITEMID_CHILD UNALIGNED *PCUITEMID_CHILD;
+typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;
+
cpp_quote("#include <poppack.h>")
#ifndef MAX_PATH