James Hawkins : fusion: Add a stub implementation of IAssemblyEnum.
Alexandre Julliard
julliard at winehq.org
Tue Mar 25 06:58:22 CDT 2008
Module: wine
Branch: master
Commit: 082b46887a548599f980c08a58f07d1789e76d67
URL: http://source.winehq.org/git/wine.git/?a=commit;h=082b46887a548599f980c08a58f07d1789e76d67
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Tue Mar 25 00:03:15 2008 -0500
fusion: Add a stub implementation of IAssemblyEnum.
---
dlls/fusion/asmcache.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++
include/fusion.idl | 7 ++++
2 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/dlls/fusion/asmcache.c b/dlls/fusion/asmcache.c
index 36c29f2..3bee109 100644
--- a/dlls/fusion/asmcache.c
+++ b/dlls/fusion/asmcache.c
@@ -235,3 +235,86 @@ static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl = {
IAssemblyCacheItemImpl_Commit,
IAssemblyCacheItemImpl_AbortItem
};
+
+/* IAssemblyEnum */
+
+typedef struct {
+ const IAssemblyEnumVtbl *lpIAssemblyEnumVtbl;
+
+ LONG ref;
+} IAssemblyEnumImpl;
+
+static HRESULT WINAPI IAssemblyEnumImpl_QueryInterface(IAssemblyEnum *iface,
+ REFIID riid, LPVOID *ppobj)
+{
+ IAssemblyEnumImpl *This = (IAssemblyEnumImpl *)iface;
+
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
+
+ *ppobj = NULL;
+
+ if (IsEqualIID(riid, &IID_IUnknown) ||
+ IsEqualIID(riid, &IID_IAssemblyEnum))
+ {
+ IUnknown_AddRef(iface);
+ *ppobj = This;
+ return S_OK;
+ }
+
+ WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IAssemblyEnumImpl_AddRef(IAssemblyEnum *iface)
+{
+ IAssemblyEnumImpl *This = (IAssemblyEnumImpl *)iface;
+ ULONG refCount = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
+
+ return refCount;
+}
+
+static ULONG WINAPI IAssemblyEnumImpl_Release(IAssemblyEnum *iface)
+{
+ IAssemblyEnumImpl *This = (IAssemblyEnumImpl *)iface;
+ ULONG refCount = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
+
+ if (!refCount)
+ HeapFree(GetProcessHeap(), 0, This);
+
+ return refCount;
+}
+
+static HRESULT WINAPI IAssemblyEnumImpl_GetNextAssembly(IAssemblyEnum *iface,
+ LPVOID pvReserved,
+ IAssemblyName **ppName,
+ DWORD dwFlags)
+{
+ FIXME("(%p, %p, %p, %d) stub!\n", iface, pvReserved, ppName, dwFlags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IAssemblyEnumImpl_Reset(IAssemblyEnum *iface)
+{
+ FIXME("(%p) stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IAssemblyEnumImpl_Clone(IAssemblyEnum *iface,
+ IAssemblyEnum **ppEnum)
+{
+ FIXME("(%p, %p) stub!\n", iface, ppEnum);
+ return E_NOTIMPL;
+}
+
+static const IAssemblyEnumVtbl AssemblyEnumVtbl = {
+ IAssemblyEnumImpl_QueryInterface,
+ IAssemblyEnumImpl_AddRef,
+ IAssemblyEnumImpl_Release,
+ IAssemblyEnumImpl_GetNextAssembly,
+ IAssemblyEnumImpl_Reset,
+ IAssemblyEnumImpl_Clone
+};
diff --git a/include/fusion.idl b/include/fusion.idl
index 6f14082..9963838 100644
--- a/include/fusion.idl
+++ b/include/fusion.idl
@@ -312,7 +312,14 @@ interface IAssemblyName: IUnknown
]
interface IAssemblyEnum : IUnknown
{
+ HRESULT GetNextAssembly(
+ [in] LPVOID pvReserved,
+ [out] IAssemblyName **ppName,
+ [in] DWORD dwFlags);
+
+ HRESULT Reset(void);
+ HRESULT Clone([out] IAssemblyEnum **ppEnum);
}
[
More information about the wine-cvs
mailing list