msvcp100: Remove unused thiscall functions.
[wine] / dlls / fusion / asmcache.c
1 /*
2  * IAssemblyCache implementation
3  *
4  * Copyright 2008 James Hawkins
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winver.h"
30 #include "wincrypt.h"
31 #include "winreg.h"
32 #include "shlwapi.h"
33 #include "dbghelp.h"
34 #include "ole2.h"
35 #include "fusion.h"
36 #include "corerror.h"
37
38 #include "fusionpriv.h"
39 #include "wine/debug.h"
40 #include "wine/unicode.h"
41
42 WINE_DEFAULT_DEBUG_CHANNEL(fusion);
43
44 static const WCHAR cache_mutex_nameW[] =
45     {'_','_','W','I','N','E','_','F','U','S','I','O','N','_','C','A','C','H','E','_','M','U','T','E','X','_','_',0};
46
47 static BOOL create_full_path(LPCWSTR path)
48 {
49     LPWSTR new_path;
50     BOOL ret = TRUE;
51     int len;
52
53     new_path = HeapAlloc(GetProcessHeap(), 0, (strlenW(path) + 1) * sizeof(WCHAR));
54     if (!new_path)
55         return FALSE;
56
57     strcpyW(new_path, path);
58
59     while ((len = strlenW(new_path)) && new_path[len - 1] == '\\')
60         new_path[len - 1] = 0;
61
62     while (!CreateDirectoryW(new_path, NULL))
63     {
64         LPWSTR slash;
65         DWORD last_error = GetLastError();
66
67         if(last_error == ERROR_ALREADY_EXISTS)
68             break;
69
70         if(last_error != ERROR_PATH_NOT_FOUND)
71         {
72             ret = FALSE;
73             break;
74         }
75
76         if(!(slash = strrchrW(new_path, '\\')))
77         {
78             ret = FALSE;
79             break;
80         }
81
82         len = slash - new_path;
83         new_path[len] = 0;
84         if(!create_full_path(new_path))
85         {
86             ret = FALSE;
87             break;
88         }
89
90         new_path[len] = '\\';
91     }
92
93     HeapFree(GetProcessHeap(), 0, new_path);
94     return ret;
95 }
96
97 static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
98 {
99     static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T','\\',0};
100     static const WCHAR gac[] = {'\\','a','s','s','e','m','b','l','y','\\','G','A','C',0};
101     static const WCHAR msil[] = {'_','M','S','I','L',0};
102     static const WCHAR x86[] = {'_','3','2',0};
103     static const WCHAR amd64[] = {'_','6','4',0};
104     DWORD len = GetWindowsDirectoryW(dir, size);
105
106     if (!strcmp(version, "v4.0.30319"))
107     {
108         strcpyW(dir + len, dotnet);
109         len += sizeof(dotnet)/sizeof(WCHAR) -1;
110         strcpyW(dir + len, gac + 1);
111         len += sizeof(gac)/sizeof(WCHAR) - 2;
112     }
113     else
114     {
115         strcpyW(dir + len, gac);
116         len += sizeof(gac)/sizeof(WCHAR) - 1;
117     }
118     switch (architecture)
119     {
120         case peNone:
121             break;
122
123         case peMSIL:
124             strcpyW(dir + len, msil);
125             break;
126
127         case peI386:
128             strcpyW(dir + len, x86);
129             break;
130
131         case peAMD64:
132             strcpyW(dir + len, amd64);
133             break;
134
135         default:
136             WARN("unhandled architecture %u\n", architecture);
137             return FALSE;
138     }
139     return TRUE;
140 }
141
142 /* IAssemblyCache */
143
144 typedef struct {
145     IAssemblyCache IAssemblyCache_iface;
146
147     LONG ref;
148     HANDLE lock;
149 } IAssemblyCacheImpl;
150
151 static inline IAssemblyCacheImpl *impl_from_IAssemblyCache(IAssemblyCache *iface)
152 {
153     return CONTAINING_RECORD(iface, IAssemblyCacheImpl, IAssemblyCache_iface);
154 }
155
156 static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface,
157                                                         REFIID riid, LPVOID *ppobj)
158 {
159     IAssemblyCacheImpl *This = impl_from_IAssemblyCache(iface);
160
161     TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
162
163     *ppobj = NULL;
164
165     if (IsEqualIID(riid, &IID_IUnknown) ||
166         IsEqualIID(riid, &IID_IAssemblyCache))
167     {
168         IAssemblyCache_AddRef(iface);
169         *ppobj = This;
170         return S_OK;
171     }
172
173     WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
174     return E_NOINTERFACE;
175 }
176
177 static ULONG WINAPI IAssemblyCacheImpl_AddRef(IAssemblyCache *iface)
178 {
179     IAssemblyCacheImpl *This = impl_from_IAssemblyCache(iface);
180     ULONG refCount = InterlockedIncrement(&This->ref);
181
182     TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
183
184     return refCount;
185 }
186
187 static ULONG WINAPI IAssemblyCacheImpl_Release(IAssemblyCache *iface)
188 {
189     IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
190     ULONG refCount = InterlockedDecrement( &cache->ref );
191
192     TRACE("(%p)->(ref before = %u)\n", cache, refCount + 1);
193
194     if (!refCount)
195     {
196         CloseHandle( cache->lock );
197         HeapFree( GetProcessHeap(), 0, cache );
198     }
199     return refCount;
200 }
201
202 static void cache_lock( IAssemblyCacheImpl *cache )
203 {
204     WaitForSingleObject( cache->lock, INFINITE );
205 }
206
207 static void cache_unlock( IAssemblyCacheImpl *cache )
208 {
209     ReleaseMutex( cache->lock );
210 }
211
212 static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface,
213                                                            DWORD dwFlags,
214                                                            LPCWSTR pszAssemblyName,
215                                                            LPCFUSION_INSTALL_REFERENCE pRefData,
216                                                            ULONG *pulDisposition)
217 {
218     HRESULT hr;
219     IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
220     IAssemblyName *asmname, *next = NULL;
221     IAssemblyEnum *asmenum = NULL;
222     WCHAR *p, *path = NULL;
223     ULONG disp;
224     DWORD len;
225
226     TRACE("(%p, 0%08x, %s, %p, %p)\n", iface, dwFlags,
227           debugstr_w(pszAssemblyName), pRefData, pulDisposition);
228
229     if (pRefData)
230     {
231         FIXME("application reference not supported\n");
232         return E_NOTIMPL;
233     }
234     hr = CreateAssemblyNameObject( &asmname, pszAssemblyName, CANOF_PARSE_DISPLAY_NAME, NULL );
235     if (FAILED( hr ))
236         return hr;
237
238     cache_lock( cache );
239
240     hr = CreateAssemblyEnum( &asmenum, NULL, asmname, ASM_CACHE_GAC, NULL );
241     if (FAILED( hr ))
242         goto done;
243
244     hr = IAssemblyEnum_GetNextAssembly( asmenum, NULL, &next, 0 );
245     if (hr == S_FALSE)
246     {
247         if (pulDisposition)
248             *pulDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
249         goto done;
250     }
251     hr = IAssemblyName_GetPath( next, NULL, &len );
252     if (hr != HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ))
253         goto done;
254
255     if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
256     {
257         hr = E_OUTOFMEMORY;
258         goto done;
259     }
260     hr = IAssemblyName_GetPath( next, path, &len );
261     if (FAILED( hr ))
262         goto done;
263
264     if (DeleteFileW( path ))
265     {
266         if ((p = strrchrW( path, '\\' )))
267         {
268             *p = 0;
269             RemoveDirectoryW( path );
270             if ((p = strrchrW( path, '\\' )))
271             {
272                 *p = 0;
273                 RemoveDirectoryW( path );
274             }
275         }
276         disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED;
277         hr = S_OK;
278     }
279     else
280     {
281         disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
282         hr = S_FALSE;
283     }
284     if (pulDisposition) *pulDisposition = disp;
285
286 done:
287     IAssemblyName_Release( asmname );
288     if (next) IAssemblyName_Release( next );
289     if (asmenum) IAssemblyEnum_Release( asmenum );
290     HeapFree( GetProcessHeap(), 0, path );
291     cache_unlock( cache );
292     return hr;
293 }
294
295 static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface,
296                                                            DWORD dwFlags,
297                                                            LPCWSTR pszAssemblyName,
298                                                            ASSEMBLY_INFO *pAsmInfo)
299 {
300     IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
301     IAssemblyName *asmname, *next = NULL;
302     IAssemblyEnum *asmenum = NULL;
303     HRESULT hr;
304
305     TRACE("(%p, %d, %s, %p)\n", iface, dwFlags,
306           debugstr_w(pszAssemblyName), pAsmInfo);
307
308     if (pAsmInfo)
309     {
310         if (pAsmInfo->cbAssemblyInfo == 0)
311             pAsmInfo->cbAssemblyInfo = sizeof(ASSEMBLY_INFO);
312         else if (pAsmInfo->cbAssemblyInfo != sizeof(ASSEMBLY_INFO))
313             return E_INVALIDARG;
314     }
315
316     hr = CreateAssemblyNameObject(&asmname, pszAssemblyName,
317                                   CANOF_PARSE_DISPLAY_NAME, NULL);
318     if (FAILED(hr))
319         return hr;
320
321     cache_lock( cache );
322
323     hr = CreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL);
324     if (FAILED(hr))
325         goto done;
326
327     for (;;)
328     {
329         hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0);
330         if (hr != S_OK)
331         {
332             hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
333             goto done;
334         }
335         hr = IAssemblyName_IsEqual(asmname, next, ASM_CMPF_IL_ALL);
336         if (hr == S_OK) break;
337     }
338
339     if (!pAsmInfo)
340         goto done;
341
342     hr = IAssemblyName_GetPath(next, pAsmInfo->pszCurrentAssemblyPathBuf, &pAsmInfo->cchBuf);
343
344     pAsmInfo->dwAssemblyFlags = ASSEMBLYINFO_FLAG_INSTALLED;
345
346 done:
347     IAssemblyName_Release(asmname);
348     if (next) IAssemblyName_Release(next);
349     if (asmenum) IAssemblyEnum_Release(asmenum);
350     cache_unlock( cache );
351     return hr;
352 }
353
354 static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface,
355                                                                  DWORD dwFlags,
356                                                                  PVOID pvReserved,
357                                                                  IAssemblyCacheItem **ppAsmItem,
358                                                                  LPCWSTR pszAssemblyName)
359 {
360     FIXME("(%p, %d, %p, %p, %s) stub!\n", iface, dwFlags, pvReserved,
361           ppAsmItem, debugstr_w(pszAssemblyName));
362
363     return E_NOTIMPL;
364 }
365
366 static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface,
367                                                                  IUnknown **ppUnkReserved)
368 {
369     FIXME("(%p, %p) stub!\n", iface, ppUnkReserved);
370     return E_NOTIMPL;
371 }
372
373 static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len,
374                           const WCHAR *filename )
375 {
376     WCHAR *src_file, *dst_file;
377     DWORD len = strlenW( filename );
378     HRESULT hr = S_OK;
379
380     if (!(src_file = HeapAlloc( GetProcessHeap(), 0, (src_len + len + 1) * sizeof(WCHAR) )))
381         return E_OUTOFMEMORY;
382     memcpy( src_file, src_dir, src_len * sizeof(WCHAR) );
383     strcpyW( src_file + src_len, filename );
384
385     if (!(dst_file = HeapAlloc( GetProcessHeap(), 0, (dst_len + len + 1) * sizeof(WCHAR) )))
386     {
387         HeapFree( GetProcessHeap(), 0, src_file );
388         return E_OUTOFMEMORY;
389     }
390     memcpy( dst_file, dst_dir, dst_len * sizeof(WCHAR) );
391     strcpyW( dst_file + dst_len, filename );
392
393     if (!CopyFileW( src_file, dst_file, FALSE )) hr = HRESULT_FROM_WIN32( GetLastError() );
394     HeapFree( GetProcessHeap(), 0, src_file );
395     HeapFree( GetProcessHeap(), 0, dst_file );
396     return hr;
397 }
398
399 static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
400                                                          DWORD dwFlags,
401                                                          LPCWSTR pszManifestFilePath,
402                                                          LPCFUSION_INSTALL_REFERENCE pRefData)
403 {
404     static const WCHAR format[] =
405         {'%','s','\\','%','s','\\','%','s','_','_','%','s','\\',0};
406     static const WCHAR format_v40[] =
407         {'%','s','\\','%','s','\\','v','4','.','0','_','%','s','_','_','%','s','\\',0};
408     static const WCHAR ext_exe[] = {'.','e','x','e',0};
409     static const WCHAR ext_dll[] = {'.','d','l','l',0};
410     IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
411     ASSEMBLY *assembly;
412     const WCHAR *extension, *filename, *src_dir;
413     WCHAR *name = NULL, *token = NULL, *version = NULL, *asmpath = NULL;
414     WCHAR asmdir[MAX_PATH], *p, **external_files = NULL, *dst_dir = NULL;
415     PEKIND architecture;
416     char *clr_version;
417     DWORD i, count = 0, src_len, dst_len = sizeof(format_v40)/sizeof(format_v40[0]);
418     HRESULT hr;
419
420     TRACE("(%p, %d, %s, %p)\n", iface, dwFlags,
421           debugstr_w(pszManifestFilePath), pRefData);
422
423     if (!pszManifestFilePath || !*pszManifestFilePath)
424         return E_INVALIDARG;
425
426     if (!(extension = strrchrW(pszManifestFilePath, '.')))
427         return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
428
429     if (lstrcmpiW(extension, ext_exe) && lstrcmpiW(extension, ext_dll))
430         return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
431
432     if (GetFileAttributesW(pszManifestFilePath) == INVALID_FILE_ATTRIBUTES)
433         return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
434
435     hr = assembly_create(&assembly, pszManifestFilePath);
436     if (FAILED(hr))
437     {
438         hr = COR_E_ASSEMBLYEXPECTED;
439         goto done;
440     }
441
442     hr = assembly_get_name(assembly, &name);
443     if (FAILED(hr))
444         goto done;
445
446     hr = assembly_get_pubkey_token(assembly, &token);
447     if (FAILED(hr))
448         goto done;
449
450     hr = assembly_get_version(assembly, &version);
451     if (FAILED(hr))
452         goto done;
453
454     hr = assembly_get_runtime_version(assembly, &clr_version);
455     if (FAILED(hr))
456         goto done;
457
458     hr = assembly_get_external_files(assembly, &external_files, &count);
459     if (FAILED(hr))
460         goto done;
461
462     cache_lock( cache );
463
464     architecture = assembly_get_architecture(assembly);
465     get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture);
466
467     dst_len += strlenW(asmdir) + strlenW(name) + strlenW(version) + strlenW(token);
468     if (!(dst_dir = HeapAlloc(GetProcessHeap(), 0, dst_len * sizeof(WCHAR))))
469     {
470         hr = E_OUTOFMEMORY;
471         goto done;
472     }
473     if (!strcmp(clr_version, "v4.0.30319"))
474         dst_len = sprintfW(dst_dir, format_v40, asmdir, name, version, token);
475     else
476         dst_len = sprintfW(dst_dir, format, asmdir, name, version, token);
477
478     create_full_path(dst_dir);
479
480     hr = assembly_get_path(assembly, &asmpath);
481     if (FAILED(hr))
482         goto done;
483
484     if ((p = strrchrW(asmpath, '\\')))
485     {
486         filename = p + 1;
487         src_dir  = asmpath;
488         src_len  = filename - asmpath;
489     }
490     else
491     {
492         filename = asmpath;
493         src_dir  = NULL;
494         src_len  = 0;
495     }
496     hr = copy_file(src_dir, src_len, dst_dir, dst_len, filename);
497     if (FAILED(hr))
498         goto done;
499
500     for (i = 0; i < count; i++)
501     {
502         hr = copy_file(src_dir, src_len, dst_dir, dst_len, external_files[i]);
503         if (FAILED(hr))
504             break;
505     }
506
507 done:
508     HeapFree(GetProcessHeap(), 0, name);
509     HeapFree(GetProcessHeap(), 0, token);
510     HeapFree(GetProcessHeap(), 0, version);
511     HeapFree(GetProcessHeap(), 0, asmpath);
512     HeapFree(GetProcessHeap(), 0, dst_dir);
513     for (i = 0; i < count; i++) HeapFree(GetProcessHeap(), 0, external_files[i]);
514     HeapFree(GetProcessHeap(), 0, external_files);
515     assembly_release(assembly);
516     cache_unlock( cache );
517     return hr;
518 }
519
520 static const IAssemblyCacheVtbl AssemblyCacheVtbl = {
521     IAssemblyCacheImpl_QueryInterface,
522     IAssemblyCacheImpl_AddRef,
523     IAssemblyCacheImpl_Release,
524     IAssemblyCacheImpl_UninstallAssembly,
525     IAssemblyCacheImpl_QueryAssemblyInfo,
526     IAssemblyCacheImpl_CreateAssemblyCacheItem,
527     IAssemblyCacheImpl_CreateAssemblyScavenger,
528     IAssemblyCacheImpl_InstallAssembly
529 };
530
531 /******************************************************************
532  *  CreateAssemblyCache   (FUSION.@)
533  */
534 HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved)
535 {
536     IAssemblyCacheImpl *cache;
537
538     TRACE("(%p, %d)\n", ppAsmCache, dwReserved);
539
540     if (!ppAsmCache)
541         return E_INVALIDARG;
542
543     *ppAsmCache = NULL;
544
545     cache = HeapAlloc(GetProcessHeap(), 0, sizeof(IAssemblyCacheImpl));
546     if (!cache)
547         return E_OUTOFMEMORY;
548
549     cache->IAssemblyCache_iface.lpVtbl = &AssemblyCacheVtbl;
550     cache->ref = 1;
551     cache->lock = CreateMutexW( NULL, FALSE, cache_mutex_nameW );
552     if (!cache->lock)
553     {
554         HeapFree( GetProcessHeap(), 0, cache );
555         return HRESULT_FROM_WIN32( GetLastError() );
556     }
557     *ppAsmCache = &cache->IAssemblyCache_iface;
558     return S_OK;
559 }
560
561 /* IAssemblyCacheItem */
562
563 typedef struct {
564     IAssemblyCacheItem IAssemblyCacheItem_iface;
565
566     LONG ref;
567 } IAssemblyCacheItemImpl;
568
569 static inline IAssemblyCacheItemImpl *impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
570 {
571     return CONTAINING_RECORD(iface, IAssemblyCacheItemImpl, IAssemblyCacheItem_iface);
572 }
573
574 static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *iface,
575                                                             REFIID riid, LPVOID *ppobj)
576 {
577     IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
578
579     TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
580
581     *ppobj = NULL;
582
583     if (IsEqualIID(riid, &IID_IUnknown) ||
584         IsEqualIID(riid, &IID_IAssemblyCacheItem))
585     {
586         IAssemblyCacheItem_AddRef(iface);
587         *ppobj = This;
588         return S_OK;
589     }
590
591     WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
592     return E_NOINTERFACE;
593 }
594
595 static ULONG WINAPI IAssemblyCacheItemImpl_AddRef(IAssemblyCacheItem *iface)
596 {
597     IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
598     ULONG refCount = InterlockedIncrement(&This->ref);
599
600     TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
601
602     return refCount;
603 }
604
605 static ULONG WINAPI IAssemblyCacheItemImpl_Release(IAssemblyCacheItem *iface)
606 {
607     IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
608     ULONG refCount = InterlockedDecrement(&This->ref);
609
610     TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
611
612     if (!refCount)
613         HeapFree(GetProcessHeap(), 0, This);
614
615     return refCount;
616 }
617
618 static HRESULT WINAPI IAssemblyCacheItemImpl_CreateStream(IAssemblyCacheItem *iface,
619                                                         DWORD dwFlags,
620                                                         LPCWSTR pszStreamName,
621                                                         DWORD dwFormat,
622                                                         DWORD dwFormatFlags,
623                                                         IStream **ppIStream,
624                                                         ULARGE_INTEGER *puliMaxSize)
625 {
626     FIXME("(%p, %d, %s, %d, %d, %p, %p) stub!\n", iface, dwFlags,
627           debugstr_w(pszStreamName), dwFormat, dwFormatFlags, ppIStream, puliMaxSize);
628
629     return E_NOTIMPL;
630 }
631
632 static HRESULT WINAPI IAssemblyCacheItemImpl_Commit(IAssemblyCacheItem *iface,
633                                                   DWORD dwFlags,
634                                                   ULONG *pulDisposition)
635 {
636     FIXME("(%p, %d, %p) stub!\n", iface, dwFlags, pulDisposition);
637     return E_NOTIMPL;
638 }
639
640 static HRESULT WINAPI IAssemblyCacheItemImpl_AbortItem(IAssemblyCacheItem *iface)
641 {
642     FIXME("(%p) stub!\n", iface);
643     return E_NOTIMPL;
644 }
645
646 static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl = {
647     IAssemblyCacheItemImpl_QueryInterface,
648     IAssemblyCacheItemImpl_AddRef,
649     IAssemblyCacheItemImpl_Release,
650     IAssemblyCacheItemImpl_CreateStream,
651     IAssemblyCacheItemImpl_Commit,
652     IAssemblyCacheItemImpl_AbortItem
653 };