[PATCH 1/8] include: Add IEnumShellItems interface declaration. (try 2)

David Hedberg david.hedberg at gmail.com
Tue Jul 20 08:02:48 CDT 2010


This time with all trivial annotations stripped.

---
 dlls/actxprxy/usrmarshal.c |   27 +++++++++++++++++++++++++++
 include/shobjidl.idl       |   30 ++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/dlls/actxprxy/usrmarshal.c b/dlls/actxprxy/usrmarshal.c
index f2aacf8..b9f4f2d 100644
--- a/dlls/actxprxy/usrmarshal.c
+++ b/dlls/actxprxy/usrmarshal.c
@@ -34,6 +34,7 @@
 #include "servprov.h"
 #include "comcat.h"
 #include "docobj.h"
+#include "shobjidl.h"
 
 #include "wine/debug.h"
 
@@ -168,3 +169,29 @@ HRESULT __RPC_STUB IEnumOleDocumentViews_Next_Stub(
     TRACE("(%p)\n", This);
     return IEnumOleDocumentViews_Next( This, cViews, rgpView, pcFetched );
 }
+
+HRESULT CALLBACK IEnumShellItems_Next_Proxy(
+    IEnumShellItems *This,
+    ULONG celt,
+    IShellItem **rgelt,
+    ULONG *pceltFetched)
+{
+    ULONG fetched;
+    TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+    if (!pceltFetched) pceltFetched = &fetched;
+    return IEnumShellItems_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
+}
+
+HRESULT __RPC_STUB IEnumShellItems_Next_Stub(
+    IEnumShellItems *This,
+    ULONG celt,
+    IShellItem **rgelt,
+    ULONG *pceltFetched)
+{
+    HRESULT hr;
+    TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+    *pceltFetched = 0;
+    hr = IEnumShellItems_Next(This, celt, rgelt, pceltFetched);
+    if (hr == S_OK) *pceltFetched = celt;
+    return hr;
+}
diff --git a/include/shobjidl.idl b/include/shobjidl.idl
index 5ad5bf4..9200b10 100644
--- a/include/shobjidl.idl
+++ b/include/shobjidl.idl
@@ -414,6 +414,36 @@ interface INewWindowManager : IUnknown
 cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
 
 /*****************************************************************************
+ * IEnumShellItems interface
+ */
+[
+ object,
+ uuid(70629033-E363-4A28-A567-0DB78006E6D7),
+ pointer_default(unique)
+]
+interface IEnumShellItems : IUnknown
+{
+    [local] HRESULT Next(
+        [in] ULONG celt,
+        [out, size_is(celt), length_is(*pceltFetched), annotation("__out_ecount_part(celt, *pceltFetched)")]
+             IShellItem **rgelt,
+        [out, annotation("__out_opt __deref_out_range(0, celt)")] ULONG *pceltFetched);
+
+    [call_as(Next)] HRESULT RemoteNext(
+        [in] ULONG celt,
+        [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
+        [out] ULONG *pceltFetched);
+
+    HRESULT Skip(
+        [in] ULONG celt);
+
+    HRESULT Reset();
+
+    HRESULT Clone(
+        [out] IEnumShellItems **ppenum);
+}
+
+/*****************************************************************************
  * FOLDERSETTINGS
  */
 typedef char *LPVIEWSETTINGS;
-- 
1.7.1.1




More information about the wine-patches mailing list