=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: fusion: Add implementation for CreateAssemblyCacheItem.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 3 15:43:25 CST 2014
Module: wine
Branch: master
Commit: bf70fe3611c2b655c28d6afc7ff0afd8ccb49e59
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf70fe3611c2b655c28d6afc7ff0afd8ccb49e59
Author: André Hentschel <nerv at dawncrow.de>
Date: Sun Nov 30 13:15:45 2014 +0100
fusion: Add implementation for CreateAssemblyCacheItem.
---
dlls/fusion/asmcache.c | 47 ++++++++++++++++++++++++++++++++---------------
1 file changed, 32 insertions(+), 15 deletions(-)
diff --git a/dlls/fusion/asmcache.c b/dlls/fusion/asmcache.c
index 9125655..dd84d38 100644
--- a/dlls/fusion/asmcache.c
+++ b/dlls/fusion/asmcache.c
@@ -41,6 +41,19 @@
WINE_DEFAULT_DEBUG_CHANNEL(fusion);
+typedef struct {
+ IAssemblyCache IAssemblyCache_iface;
+
+ LONG ref;
+ HANDLE lock;
+} IAssemblyCacheImpl;
+
+typedef struct {
+ IAssemblyCacheItem IAssemblyCacheItem_iface;
+
+ LONG ref;
+} IAssemblyCacheItemImpl;
+
static const WCHAR cache_mutex_nameW[] =
{'_','_','W','I','N','E','_','F','U','S','I','O','N','_','C','A','C','H','E','_','M','U','T','E','X','_','_',0};
@@ -141,13 +154,6 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version,
/* IAssemblyCache */
-typedef struct {
- IAssemblyCache IAssemblyCache_iface;
-
- LONG ref;
- HANDLE lock;
-} IAssemblyCacheImpl;
-
static inline IAssemblyCacheImpl *impl_from_IAssemblyCache(IAssemblyCache *iface)
{
return CONTAINING_RECORD(iface, IAssemblyCacheImpl, IAssemblyCache_iface);
@@ -351,16 +357,33 @@ done:
return hr;
}
+static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl;
+
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface,
DWORD dwFlags,
PVOID pvReserved,
IAssemblyCacheItem **ppAsmItem,
LPCWSTR pszAssemblyName)
{
- FIXME("(%p, %d, %p, %p, %s) stub!\n", iface, dwFlags, pvReserved,
+ IAssemblyCacheItemImpl *item;
+
+ FIXME("(%p, %d, %p, %p, %s) semi-stub!\n", iface, dwFlags, pvReserved,
ppAsmItem, debugstr_w(pszAssemblyName));
- return E_NOTIMPL;
+ if (!ppAsmItem)
+ return E_INVALIDARG;
+
+ *ppAsmItem = NULL;
+
+ item = HeapAlloc(GetProcessHeap(), 0, sizeof(IAssemblyCacheItemImpl));
+ if (!item)
+ return E_OUTOFMEMORY;
+
+ item->IAssemblyCacheItem_iface.lpVtbl = &AssemblyCacheItemVtbl;
+ item->ref = 1;
+
+ *ppAsmItem = &item->IAssemblyCacheItem_iface;
+ return S_OK;
}
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface,
@@ -560,12 +583,6 @@ HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved
/* IAssemblyCacheItem */
-typedef struct {
- IAssemblyCacheItem IAssemblyCacheItem_iface;
-
- LONG ref;
-} IAssemblyCacheItemImpl;
-
static inline IAssemblyCacheItemImpl *impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
{
return CONTAINING_RECORD(iface, IAssemblyCacheItemImpl, IAssemblyCacheItem_iface);
More information about the wine-cvs
mailing list