asmcache.c 19.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * IAssemblyCache implementation
 *
 * Copyright 2008 James Hawkins
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#include <stdarg.h>
22
#include <stdio.h>
23 24 25 26 27 28

#define COBJMACROS

#include "windef.h"
#include "winbase.h"
#include "winuser.h"
29 30 31 32 33
#include "winver.h"
#include "wincrypt.h"
#include "winreg.h"
#include "shlwapi.h"
#include "dbghelp.h"
34 35
#include "ole2.h"
#include "fusion.h"
36 37 38
#include "corerror.h"

#include "fusionpriv.h"
39 40 41 42
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(fusion);

43 44 45 46 47 48 49 50 51 52 53 54 55
typedef struct {
    IAssemblyCache IAssemblyCache_iface;

    LONG ref;
    HANDLE lock;
} IAssemblyCacheImpl;

typedef struct {
    IAssemblyCacheItem IAssemblyCacheItem_iface;

    LONG ref;
} IAssemblyCacheItemImpl;

56 57 58
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};

59
static BOOL create_full_path(LPCWSTR path)
60
{
61
    LPWSTR new_path;
62 63 64
    BOOL ret = TRUE;
    int len;

65
    if (!(new_path = malloc((lstrlenW(path) + 1) * sizeof(WCHAR)))) return FALSE;
66

67
    lstrcpyW(new_path, path);
68

69
    while ((len = lstrlenW(new_path)) && new_path[len - 1] == '\\')
70 71
        new_path[len - 1] = 0;

72
    while (!CreateDirectoryW(new_path, NULL))
73
    {
74
        LPWSTR slash;
75 76 77 78 79 80 81 82 83 84 85
        DWORD last_error = GetLastError();

        if(last_error == ERROR_ALREADY_EXISTS)
            break;

        if(last_error != ERROR_PATH_NOT_FOUND)
        {
            ret = FALSE;
            break;
        }

86
        if(!(slash = wcsrchr(new_path, '\\')))
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
        {
            ret = FALSE;
            break;
        }

        len = slash - new_path;
        new_path[len] = 0;
        if(!create_full_path(new_path))
        {
            ret = FALSE;
            break;
        }

        new_path[len] = '\\';
    }

103
    free(new_path);
104 105 106
    return ret;
}

107
static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
108
{
109
    static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T','\\',0};
110 111 112 113
    static const WCHAR gac[] = {'\\','a','s','s','e','m','b','l','y','\\','G','A','C',0};
    static const WCHAR msil[] = {'_','M','S','I','L',0};
    static const WCHAR x86[] = {'_','3','2',0};
    static const WCHAR amd64[] = {'_','6','4',0};
114
    DWORD len = GetWindowsDirectoryW(dir, size);
115

116 117
    if (!strcmp(version, "v4.0.30319"))
    {
118
        lstrcpyW(dir + len, dotnet);
119
        len += ARRAY_SIZE(dotnet) - 1;
120
        lstrcpyW(dir + len, gac + 1);
121
        len += ARRAY_SIZE(gac) - 2;
122 123 124
    }
    else
    {
125
        lstrcpyW(dir + len, gac);
126
        len += ARRAY_SIZE(gac) - 1;
127
    }
128 129
    switch (architecture)
    {
130 131 132
        case peNone:
            break;

133
        case peMSIL:
134
            lstrcpyW(dir + len, msil);
135 136 137
            break;

        case peI386:
138
            lstrcpyW(dir + len, x86);
139 140 141
            break;

        case peAMD64:
142
            lstrcpyW(dir + len, amd64);
143
            break;
144 145 146 147

        default:
            WARN("unhandled architecture %u\n", architecture);
            return FALSE;
148
    }
149 150 151
    return TRUE;
}

152 153
/* IAssemblyCache */

154 155 156 157 158
static inline IAssemblyCacheImpl *impl_from_IAssemblyCache(IAssemblyCache *iface)
{
    return CONTAINING_RECORD(iface, IAssemblyCacheImpl, IAssemblyCache_iface);
}

159 160 161
static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface,
                                                        REFIID riid, LPVOID *ppobj)
{
162
    IAssemblyCacheImpl *This = impl_from_IAssemblyCache(iface);
163 164 165 166 167 168 169 170

    TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);

    *ppobj = NULL;

    if (IsEqualIID(riid, &IID_IUnknown) ||
        IsEqualIID(riid, &IID_IAssemblyCache))
    {
171
        IAssemblyCache_AddRef(iface);
172
        *ppobj = &This->IAssemblyCache_iface;
173 174 175 176 177 178 179 180 181
        return S_OK;
    }

    WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
    return E_NOINTERFACE;
}

static ULONG WINAPI IAssemblyCacheImpl_AddRef(IAssemblyCache *iface)
{
182
    IAssemblyCacheImpl *This = impl_from_IAssemblyCache(iface);
183 184
    ULONG refCount = InterlockedIncrement(&This->ref);

185
    TRACE("(%p)->(ref before = %lu)\n", This, refCount - 1);
186 187 188 189 190 191

    return refCount;
}

static ULONG WINAPI IAssemblyCacheImpl_Release(IAssemblyCache *iface)
{
192 193
    IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
    ULONG refCount = InterlockedDecrement( &cache->ref );
194

195
    TRACE("(%p)->(ref before = %lu)\n", cache, refCount + 1);
196 197

    if (!refCount)
198 199
    {
        CloseHandle( cache->lock );
200
        free( cache );
201
    }
202 203 204
    return refCount;
}

205 206 207 208 209 210 211 212 213 214
static void cache_lock( IAssemblyCacheImpl *cache )
{
    WaitForSingleObject( cache->lock, INFINITE );
}

static void cache_unlock( IAssemblyCacheImpl *cache )
{
    ReleaseMutex( cache->lock );
}

215 216 217 218 219 220
static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface,
                                                           DWORD dwFlags,
                                                           LPCWSTR pszAssemblyName,
                                                           LPCFUSION_INSTALL_REFERENCE pRefData,
                                                           ULONG *pulDisposition)
{
221
    HRESULT hr;
222
    IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
223 224 225 226 227 228
    IAssemblyName *asmname, *next = NULL;
    IAssemblyEnum *asmenum = NULL;
    WCHAR *p, *path = NULL;
    ULONG disp;
    DWORD len;

229
    TRACE("(%p, 0%08lx, %s, %p, %p)\n", iface, dwFlags,
230 231
          debugstr_w(pszAssemblyName), pRefData, pulDisposition);

232 233 234 235 236 237 238 239 240
    if (pRefData)
    {
        FIXME("application reference not supported\n");
        return E_NOTIMPL;
    }
    hr = CreateAssemblyNameObject( &asmname, pszAssemblyName, CANOF_PARSE_DISPLAY_NAME, NULL );
    if (FAILED( hr ))
        return hr;

241 242
    cache_lock( cache );

243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
    hr = CreateAssemblyEnum( &asmenum, NULL, asmname, ASM_CACHE_GAC, NULL );
    if (FAILED( hr ))
        goto done;

    hr = IAssemblyEnum_GetNextAssembly( asmenum, NULL, &next, 0 );
    if (hr == S_FALSE)
    {
        if (pulDisposition)
            *pulDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
        goto done;
    }
    hr = IAssemblyName_GetPath( next, NULL, &len );
    if (hr != HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ))
        goto done;

258
    if (!(path = malloc( len * sizeof(WCHAR) )))
259 260 261 262 263 264 265 266 267 268
    {
        hr = E_OUTOFMEMORY;
        goto done;
    }
    hr = IAssemblyName_GetPath( next, path, &len );
    if (FAILED( hr ))
        goto done;

    if (DeleteFileW( path ))
    {
269
        if ((p = wcsrchr( path, '\\' )))
270 271 272
        {
            *p = 0;
            RemoveDirectoryW( path );
273
            if ((p = wcsrchr( path, '\\' )))
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
            {
                *p = 0;
                RemoveDirectoryW( path );
            }
        }
        disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED;
        hr = S_OK;
    }
    else
    {
        disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
        hr = S_FALSE;
    }
    if (pulDisposition) *pulDisposition = disp;

done:
    IAssemblyName_Release( asmname );
    if (next) IAssemblyName_Release( next );
    if (asmenum) IAssemblyEnum_Release( asmenum );
293
    free( path );
294
    cache_unlock( cache );
295
    return hr;
296 297 298 299 300 301 302
}

static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface,
                                                           DWORD dwFlags,
                                                           LPCWSTR pszAssemblyName,
                                                           ASSEMBLY_INFO *pAsmInfo)
{
303
    IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
304 305 306 307
    IAssemblyName *asmname, *next = NULL;
    IAssemblyEnum *asmenum = NULL;
    HRESULT hr;

308
    TRACE("(%p, %ld, %s, %p)\n", iface, dwFlags,
309 310
          debugstr_w(pszAssemblyName), pAsmInfo);

311 312 313 314 315 316 317 318 319 320 321 322 323
    if (pAsmInfo)
    {
        if (pAsmInfo->cbAssemblyInfo == 0)
            pAsmInfo->cbAssemblyInfo = sizeof(ASSEMBLY_INFO);
        else if (pAsmInfo->cbAssemblyInfo != sizeof(ASSEMBLY_INFO))
            return E_INVALIDARG;
    }

    hr = CreateAssemblyNameObject(&asmname, pszAssemblyName,
                                  CANOF_PARSE_DISPLAY_NAME, NULL);
    if (FAILED(hr))
        return hr;

324 325
    cache_lock( cache );

326 327 328 329
    hr = CreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL);
    if (FAILED(hr))
        goto done;

330
    for (;;)
331
    {
332 333 334 335 336 337 338 339
        hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0);
        if (hr != S_OK)
        {
            hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
            goto done;
        }
        hr = IAssemblyName_IsEqual(asmname, next, ASM_CMPF_IL_ALL);
        if (hr == S_OK) break;
340 341 342 343 344
    }

    if (!pAsmInfo)
        goto done;

345 346
    hr = IAssemblyName_GetPath(next, pAsmInfo->pszCurrentAssemblyPathBuf, &pAsmInfo->cchBuf);

347 348 349 350 351 352
    pAsmInfo->dwAssemblyFlags = ASSEMBLYINFO_FLAG_INSTALLED;

done:
    IAssemblyName_Release(asmname);
    if (next) IAssemblyName_Release(next);
    if (asmenum) IAssemblyEnum_Release(asmenum);
353
    cache_unlock( cache );
354
    return hr;
355 356
}

357 358
static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl;

359 360 361 362 363 364
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface,
                                                                 DWORD dwFlags,
                                                                 PVOID pvReserved,
                                                                 IAssemblyCacheItem **ppAsmItem,
                                                                 LPCWSTR pszAssemblyName)
{
365 366
    IAssemblyCacheItemImpl *item;

367
    FIXME("(%p, %ld, %p, %p, %s) semi-stub!\n", iface, dwFlags, pvReserved,
368 369
          ppAsmItem, debugstr_w(pszAssemblyName));

370 371 372 373 374
    if (!ppAsmItem)
        return E_INVALIDARG;

    *ppAsmItem = NULL;

375
    if (!(item = malloc(sizeof(*item)))) return E_OUTOFMEMORY;
376 377 378 379 380 381

    item->IAssemblyCacheItem_iface.lpVtbl = &AssemblyCacheItemVtbl;
    item->ref = 1;

    *ppAsmItem = &item->IAssemblyCacheItem_iface;
    return S_OK;
382 383 384 385 386 387 388 389 390
}

static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface,
                                                                 IUnknown **ppUnkReserved)
{
    FIXME("(%p, %p) stub!\n", iface, ppUnkReserved);
    return E_NOTIMPL;
}

391 392 393 394
static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len,
                          const WCHAR *filename )
{
    WCHAR *src_file, *dst_file;
395
    DWORD len = lstrlenW( filename );
396 397
    HRESULT hr = S_OK;

398
    if (!(src_file = malloc( (src_len + len + 1) * sizeof(WCHAR) )))
399 400
        return E_OUTOFMEMORY;
    memcpy( src_file, src_dir, src_len * sizeof(WCHAR) );
401
    lstrcpyW( src_file + src_len, filename );
402

403
    if (!(dst_file = malloc( (dst_len + len + 1) * sizeof(WCHAR) )))
404
    {
405
        free( src_file );
406 407 408
        return E_OUTOFMEMORY;
    }
    memcpy( dst_file, dst_dir, dst_len * sizeof(WCHAR) );
409
    lstrcpyW( dst_file + dst_len, filename );
410 411

    if (!CopyFileW( src_file, dst_file, FALSE )) hr = HRESULT_FROM_WIN32( GetLastError() );
412 413
    free( src_file );
    free( dst_file );
414 415 416
    return hr;
}

417 418 419 420 421
static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
                                                         DWORD dwFlags,
                                                         LPCWSTR pszManifestFilePath,
                                                         LPCFUSION_INSTALL_REFERENCE pRefData)
{
422 423 424 425
    static const WCHAR format[] =
        {'%','s','\\','%','s','\\','%','s','_','_','%','s','\\',0};
    static const WCHAR format_v40[] =
        {'%','s','\\','%','s','\\','v','4','.','0','_','%','s','_','_','%','s','\\',0};
426 427 428
    static const WCHAR ext_exe[] = {'.','e','x','e',0};
    static const WCHAR ext_dll[] = {'.','d','l','l',0};
    IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
429
    ASSEMBLY *assembly;
430
    const WCHAR *extension, *filename, *src_dir;
431
    WCHAR *name = NULL, *token = NULL, *version = NULL, *asmpath = NULL;
432
    WCHAR asmdir[MAX_PATH], *p, **external_files = NULL, *dst_dir = NULL;
433
    PEKIND architecture;
434
    char *clr_version;
435
    DWORD i, count = 0, src_len, dst_len = ARRAY_SIZE(format_v40);
436 437
    HRESULT hr;

438
    TRACE("(%p, %ld, %s, %p)\n", iface, dwFlags,
439 440
          debugstr_w(pszManifestFilePath), pRefData);

441 442 443
    if (!pszManifestFilePath || !*pszManifestFilePath)
        return E_INVALIDARG;

444
    if (!(extension = wcsrchr(pszManifestFilePath, '.')))
445 446
        return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);

447
    if (lstrcmpiW(extension, ext_exe) && lstrcmpiW(extension, ext_dll))
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
        return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);

    if (GetFileAttributesW(pszManifestFilePath) == INVALID_FILE_ATTRIBUTES)
        return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);

    hr = assembly_create(&assembly, pszManifestFilePath);
    if (FAILED(hr))
    {
        hr = COR_E_ASSEMBLYEXPECTED;
        goto done;
    }

    hr = assembly_get_name(assembly, &name);
    if (FAILED(hr))
        goto done;

    hr = assembly_get_pubkey_token(assembly, &token);
    if (FAILED(hr))
        goto done;

    hr = assembly_get_version(assembly, &version);
    if (FAILED(hr))
        goto done;

472 473 474 475
    hr = assembly_get_runtime_version(assembly, &clr_version);
    if (FAILED(hr))
        goto done;

476 477 478 479
    hr = assembly_get_external_files(assembly, &external_files, &count);
    if (FAILED(hr))
        goto done;

480 481
    cache_lock( cache );

482
    architecture = assembly_get_architecture(assembly);
483
    get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture);
484

485
    dst_len += lstrlenW(asmdir) + lstrlenW(name) + lstrlenW(version) + lstrlenW(token);
486
    if (!(dst_dir = malloc(dst_len * sizeof(WCHAR))))
487 488 489 490
    {
        hr = E_OUTOFMEMORY;
        goto done;
    }
491
    if (!strcmp(clr_version, "v4.0.30319"))
492
        dst_len = swprintf(dst_dir, dst_len, format_v40, asmdir, name, version, token);
493
    else
494
        dst_len = swprintf(dst_dir, dst_len, format, asmdir, name, version, token);
495

496
    create_full_path(dst_dir);
497 498 499 500 501

    hr = assembly_get_path(assembly, &asmpath);
    if (FAILED(hr))
        goto done;

502
    if ((p = wcsrchr(asmpath, '\\')))
503 504 505 506 507 508 509 510 511 512 513 514 515 516
    {
        filename = p + 1;
        src_dir  = asmpath;
        src_len  = filename - asmpath;
    }
    else
    {
        filename = asmpath;
        src_dir  = NULL;
        src_len  = 0;
    }
    hr = copy_file(src_dir, src_len, dst_dir, dst_len, filename);
    if (FAILED(hr))
        goto done;
517

518 519 520 521 522 523
    for (i = 0; i < count; i++)
    {
        hr = copy_file(src_dir, src_len, dst_dir, dst_len, external_files[i]);
        if (FAILED(hr))
            break;
    }
524 525

done:
526 527 528 529 530 531 532
    free(name);
    free(token);
    free(version);
    free(asmpath);
    free(dst_dir);
    for (i = 0; i < count; i++) free(external_files[i]);
    free(external_files);
533
    assembly_release(assembly);
534
    cache_unlock( cache );
535
    return hr;
536 537 538 539 540 541 542 543 544 545 546 547 548
}

static const IAssemblyCacheVtbl AssemblyCacheVtbl = {
    IAssemblyCacheImpl_QueryInterface,
    IAssemblyCacheImpl_AddRef,
    IAssemblyCacheImpl_Release,
    IAssemblyCacheImpl_UninstallAssembly,
    IAssemblyCacheImpl_QueryAssemblyInfo,
    IAssemblyCacheImpl_CreateAssemblyCacheItem,
    IAssemblyCacheImpl_CreateAssemblyScavenger,
    IAssemblyCacheImpl_InstallAssembly
};

549 550 551 552 553 554 555
/******************************************************************
 *  CreateAssemblyCache   (FUSION.@)
 */
HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved)
{
    IAssemblyCacheImpl *cache;

556
    TRACE("(%p, %ld)\n", ppAsmCache, dwReserved);
557 558 559 560 561 562

    if (!ppAsmCache)
        return E_INVALIDARG;

    *ppAsmCache = NULL;

563
    if (!(cache = malloc(sizeof(*cache)))) return E_OUTOFMEMORY;
564

565
    cache->IAssemblyCache_iface.lpVtbl = &AssemblyCacheVtbl;
566
    cache->ref = 1;
567 568 569
    cache->lock = CreateMutexW( NULL, FALSE, cache_mutex_nameW );
    if (!cache->lock)
    {
570
        free( cache );
571 572
        return HRESULT_FROM_WIN32( GetLastError() );
    }
573
    *ppAsmCache = &cache->IAssemblyCache_iface;
574 575 576
    return S_OK;
}

577 578
/* IAssemblyCacheItem */

579 580 581 582 583
static inline IAssemblyCacheItemImpl *impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
{
    return CONTAINING_RECORD(iface, IAssemblyCacheItemImpl, IAssemblyCacheItem_iface);
}

584 585 586
static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *iface,
                                                            REFIID riid, LPVOID *ppobj)
{
587
    IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
588 589 590 591 592 593 594 595

    TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);

    *ppobj = NULL;

    if (IsEqualIID(riid, &IID_IUnknown) ||
        IsEqualIID(riid, &IID_IAssemblyCacheItem))
    {
596
        IAssemblyCacheItem_AddRef(iface);
597
        *ppobj = &This->IAssemblyCacheItem_iface;
598 599 600 601 602 603 604 605 606
        return S_OK;
    }

    WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
    return E_NOINTERFACE;
}

static ULONG WINAPI IAssemblyCacheItemImpl_AddRef(IAssemblyCacheItem *iface)
{
607
    IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
608 609
    ULONG refCount = InterlockedIncrement(&This->ref);

610
    TRACE("(%p)->(ref before = %lu)\n", This, refCount - 1);
611 612 613 614 615 616

    return refCount;
}

static ULONG WINAPI IAssemblyCacheItemImpl_Release(IAssemblyCacheItem *iface)
{
617
    IAssemblyCacheItemImpl *This = impl_from_IAssemblyCacheItem(iface);
618 619
    ULONG refCount = InterlockedDecrement(&This->ref);

620
    TRACE("(%p)->(ref before = %lu)\n", This, refCount + 1);
621 622

    if (!refCount)
623
        free(This);
624 625 626 627 628 629 630 631 632 633 634 635

    return refCount;
}

static HRESULT WINAPI IAssemblyCacheItemImpl_CreateStream(IAssemblyCacheItem *iface,
                                                        DWORD dwFlags,
                                                        LPCWSTR pszStreamName,
                                                        DWORD dwFormat,
                                                        DWORD dwFormatFlags,
                                                        IStream **ppIStream,
                                                        ULARGE_INTEGER *puliMaxSize)
{
636
    FIXME("(%p, %ld, %s, %ld, %ld, %p, %p) stub!\n", iface, dwFlags,
637 638 639 640 641 642 643 644 645
          debugstr_w(pszStreamName), dwFormat, dwFormatFlags, ppIStream, puliMaxSize);

    return E_NOTIMPL;
}

static HRESULT WINAPI IAssemblyCacheItemImpl_Commit(IAssemblyCacheItem *iface,
                                                  DWORD dwFlags,
                                                  ULONG *pulDisposition)
{
646
    FIXME("(%p, %ld, %p) stub!\n", iface, dwFlags, pulDisposition);
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663
    return E_NOTIMPL;
}

static HRESULT WINAPI IAssemblyCacheItemImpl_AbortItem(IAssemblyCacheItem *iface)
{
    FIXME("(%p) stub!\n", iface);
    return E_NOTIMPL;
}

static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl = {
    IAssemblyCacheItemImpl_QueryInterface,
    IAssemblyCacheItemImpl_AddRef,
    IAssemblyCacheItemImpl_Release,
    IAssemblyCacheItemImpl_CreateStream,
    IAssemblyCacheItemImpl_Commit,
    IAssemblyCacheItemImpl_AbortItem
};