ReactOS 0.4.16-dev-197-g92996da
asmcache.c
Go to the documentation of this file.
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#ifdef __REACTOS__
26#define WIN32_NO_STATUS
27#endif
28
29#include "windef.h"
30#include "winbase.h"
31#include "winuser.h"
32#include "winver.h"
33#include "wincrypt.h"
34#include "winreg.h"
35#include "shlwapi.h"
36#include "dbghelp.h"
37#include "ole2.h"
38#include "fusion.h"
39#include "corerror.h"
40
41#include "fusionpriv.h"
42#include "wine/debug.h"
43
45
46typedef struct {
48
52
53typedef struct {
55
58
59static const WCHAR cache_mutex_nameW[] =
60 {'_','_','W','I','N','E','_','F','U','S','I','O','N','_','C','A','C','H','E','_','M','U','T','E','X','_','_',0};
61
63{
64 LPWSTR new_path;
65 BOOL ret = TRUE;
66 int len;
67
68 if (!(new_path = heap_alloc((lstrlenW(path) + 1) * sizeof(WCHAR)))) return FALSE;
69
70 lstrcpyW(new_path, path);
71
72 while ((len = lstrlenW(new_path)) && new_path[len - 1] == '\\')
73 new_path[len - 1] = 0;
74
75 while (!CreateDirectoryW(new_path, NULL))
76 {
77 LPWSTR slash;
79
81 break;
82
84 {
85 ret = FALSE;
86 break;
87 }
88
89 if(!(slash = wcsrchr(new_path, '\\')))
90 {
91 ret = FALSE;
92 break;
93 }
94
95 len = slash - new_path;
96 new_path[len] = 0;
97 if(!create_full_path(new_path))
98 {
99 ret = FALSE;
100 break;
101 }
102
103 new_path[len] = '\\';
104 }
105
106 heap_free(new_path);
107 return ret;
108}
109
110static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
111{
112 static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T','\\',0};
113 static const WCHAR gac[] = {'\\','a','s','s','e','m','b','l','y','\\','G','A','C',0};
114 static const WCHAR msil[] = {'_','M','S','I','L',0};
115 static const WCHAR x86[] = {'_','3','2',0};
116 static const WCHAR amd64[] = {'_','6','4',0};
118
119 if (!strcmp(version, "v4.0.30319"))
120 {
121 lstrcpyW(dir + len, dotnet);
122 len += ARRAY_SIZE(dotnet) - 1;
123 lstrcpyW(dir + len, gac + 1);
124 len += ARRAY_SIZE(gac) - 2;
125 }
126 else
127 {
128 lstrcpyW(dir + len, gac);
129 len += ARRAY_SIZE(gac) - 1;
130 }
131 switch (architecture)
132 {
133 case peNone:
134 break;
135
136 case peMSIL:
137 lstrcpyW(dir + len, msil);
138 break;
139
140 case peI386:
141 lstrcpyW(dir + len, x86);
142 break;
143
144 case peAMD64:
145 lstrcpyW(dir + len, amd64);
146 break;
147
148 default:
149 WARN("unhandled architecture %u\n", architecture);
150 return FALSE;
151 }
152 return TRUE;
153}
154
155/* IAssemblyCache */
156
158{
159 return CONTAINING_RECORD(iface, IAssemblyCacheImpl, IAssemblyCache_iface);
160}
161
163 REFIID riid, LPVOID *ppobj)
164{
166
167 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
168
169 *ppobj = NULL;
170
172 IsEqualIID(riid, &IID_IAssemblyCache))
173 {
174 IAssemblyCache_AddRef(iface);
175 *ppobj = &This->IAssemblyCache_iface;
176 return S_OK;
177 }
178
179 WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
180 return E_NOINTERFACE;
181}
182
184{
186 ULONG refCount = InterlockedIncrement(&This->ref);
187
188 TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
189
190 return refCount;
191}
192
194{
196 ULONG refCount = InterlockedDecrement( &cache->ref );
197
198 TRACE("(%p)->(ref before = %u)\n", cache, refCount + 1);
199
200 if (!refCount)
201 {
203 heap_free( cache );
204 }
205 return refCount;
206}
207
209{
211}
212
214{
216}
217
220 LPCWSTR pszAssemblyName,
222 ULONG *pulDisposition)
223{
224 HRESULT hr;
226 IAssemblyName *asmname, *next = NULL;
227 IAssemblyEnum *asmenum = NULL;
228 WCHAR *p, *path = NULL;
229 ULONG disp;
230 DWORD len;
231
232 TRACE("(%p, 0%08x, %s, %p, %p)\n", iface, dwFlags,
233 debugstr_w(pszAssemblyName), pRefData, pulDisposition);
234
235 if (pRefData)
236 {
237 FIXME("application reference not supported\n");
238 return E_NOTIMPL;
239 }
240 hr = CreateAssemblyNameObject( &asmname, pszAssemblyName, CANOF_PARSE_DISPLAY_NAME, NULL );
241 if (FAILED( hr ))
242 return hr;
243
244 cache_lock( cache );
245
246 hr = CreateAssemblyEnum( &asmenum, NULL, asmname, ASM_CACHE_GAC, NULL );
247 if (FAILED( hr ))
248 goto done;
249
250 hr = IAssemblyEnum_GetNextAssembly( asmenum, NULL, &next, 0 );
251 if (hr == S_FALSE)
252 {
253 if (pulDisposition)
254 *pulDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
255 goto done;
256 }
259 goto done;
260
261 if (!(path = heap_alloc( len * sizeof(WCHAR) )))
262 {
264 goto done;
265 }
267 if (FAILED( hr ))
268 goto done;
269
270 if (DeleteFileW( path ))
271 {
272 if ((p = wcsrchr( path, '\\' )))
273 {
274 *p = 0;
276 if ((p = wcsrchr( path, '\\' )))
277 {
278 *p = 0;
280 }
281 }
282 disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED;
283 hr = S_OK;
284 }
285 else
286 {
287 disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
288 hr = S_FALSE;
289 }
290 if (pulDisposition) *pulDisposition = disp;
291
292done:
293 IAssemblyName_Release( asmname );
294 if (next) IAssemblyName_Release( next );
295 if (asmenum) IAssemblyEnum_Release( asmenum );
296 heap_free( path );
298 return hr;
299}
300
303 LPCWSTR pszAssemblyName,
304 ASSEMBLY_INFO *pAsmInfo)
305{
307 IAssemblyName *asmname, *next = NULL;
308 IAssemblyEnum *asmenum = NULL;
309 HRESULT hr;
310
311 TRACE("(%p, %d, %s, %p)\n", iface, dwFlags,
312 debugstr_w(pszAssemblyName), pAsmInfo);
313
314 if (pAsmInfo)
315 {
316 if (pAsmInfo->cbAssemblyInfo == 0)
317 pAsmInfo->cbAssemblyInfo = sizeof(ASSEMBLY_INFO);
318 else if (pAsmInfo->cbAssemblyInfo != sizeof(ASSEMBLY_INFO))
319 return E_INVALIDARG;
320 }
321
322 hr = CreateAssemblyNameObject(&asmname, pszAssemblyName,
324 if (FAILED(hr))
325 return hr;
326
327 cache_lock( cache );
328
329 hr = CreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL);
330 if (FAILED(hr))
331 goto done;
332
333 for (;;)
334 {
335 hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0);
336 if (hr != S_OK)
337 {
339 goto done;
340 }
341 hr = IAssemblyName_IsEqual(asmname, next, ASM_CMPF_IL_ALL);
342 if (hr == S_OK) break;
343 }
344
345 if (!pAsmInfo)
346 goto done;
347
349
351
352done:
353 IAssemblyName_Release(asmname);
354 if (next) IAssemblyName_Release(next);
355 if (asmenum) IAssemblyEnum_Release(asmenum);
357 return hr;
358}
359
360static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl;
361
365 IAssemblyCacheItem **ppAsmItem,
366 LPCWSTR pszAssemblyName)
367{
369
370 FIXME("(%p, %d, %p, %p, %s) semi-stub!\n", iface, dwFlags, pvReserved,
371 ppAsmItem, debugstr_w(pszAssemblyName));
372
373 if (!ppAsmItem)
374 return E_INVALIDARG;
375
376 *ppAsmItem = NULL;
377
378 if (!(item = heap_alloc(sizeof(*item)))) return E_OUTOFMEMORY;
379
380 item->IAssemblyCacheItem_iface.lpVtbl = &AssemblyCacheItemVtbl;
381 item->ref = 1;
382
383 *ppAsmItem = &item->IAssemblyCacheItem_iface;
384 return S_OK;
385}
386
388 IUnknown **ppUnkReserved)
389{
390 FIXME("(%p, %p) stub!\n", iface, ppUnkReserved);
391 return E_NOTIMPL;
392}
393
394static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len,
395 const WCHAR *filename )
396{
397 WCHAR *src_file, *dst_file;
399 HRESULT hr = S_OK;
400
401 if (!(src_file = heap_alloc( (src_len + len + 1) * sizeof(WCHAR) )))
402 return E_OUTOFMEMORY;
403 memcpy( src_file, src_dir, src_len * sizeof(WCHAR) );
404 lstrcpyW( src_file + src_len, filename );
405
406 if (!(dst_file = heap_alloc( (dst_len + len + 1) * sizeof(WCHAR) )))
407 {
408 heap_free( src_file );
409 return E_OUTOFMEMORY;
410 }
411 memcpy( dst_file, dst_dir, dst_len * sizeof(WCHAR) );
412 lstrcpyW( dst_file + dst_len, filename );
413
414 if (!CopyFileW( src_file, dst_file, FALSE )) hr = HRESULT_FROM_WIN32( GetLastError() );
415 heap_free( src_file );
416 heap_free( dst_file );
417 return hr;
418}
419
422 LPCWSTR pszManifestFilePath,
424{
425 static const WCHAR format[] =
426 {'%','s','\\','%','s','\\','%','s','_','_','%','s','\\',0};
427 static const WCHAR format_v40[] =
428 {'%','s','\\','%','s','\\','v','4','.','0','_','%','s','_','_','%','s','\\',0};
429 static const WCHAR ext_exe[] = {'.','e','x','e',0};
430 static const WCHAR ext_dll[] = {'.','d','l','l',0};
433 const WCHAR *extension, *filename, *src_dir;
434 WCHAR *name = NULL, *token = NULL, *version = NULL, *asmpath = NULL;
435 WCHAR asmdir[MAX_PATH], *p, **external_files = NULL, *dst_dir = NULL;
436 PEKIND architecture;
437 char *clr_version;
438 DWORD i, count = 0, src_len, dst_len = ARRAY_SIZE(format_v40);
439 HRESULT hr;
440
441 TRACE("(%p, %d, %s, %p)\n", iface, dwFlags,
442 debugstr_w(pszManifestFilePath), pRefData);
443
444 if (!pszManifestFilePath || !*pszManifestFilePath)
445 return E_INVALIDARG;
446
447 if (!(extension = wcsrchr(pszManifestFilePath, '.')))
449
450 if (lstrcmpiW(extension, ext_exe) && lstrcmpiW(extension, ext_dll))
452
453 if (GetFileAttributesW(pszManifestFilePath) == INVALID_FILE_ATTRIBUTES)
455
456 hr = assembly_create(&assembly, pszManifestFilePath);
457 if (FAILED(hr))
458 {
460 goto done;
461 }
462
464 if (FAILED(hr))
465 goto done;
466
468 if (FAILED(hr))
469 goto done;
470
472 if (FAILED(hr))
473 goto done;
474
476 if (FAILED(hr))
477 goto done;
478
479 hr = assembly_get_external_files(assembly, &external_files, &count);
480 if (FAILED(hr))
481 goto done;
482
483 cache_lock( cache );
484
485 architecture = assembly_get_architecture(assembly);
486 get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture);
487
488 dst_len += lstrlenW(asmdir) + lstrlenW(name) + lstrlenW(version) + lstrlenW(token);
489 if (!(dst_dir = heap_alloc(dst_len * sizeof(WCHAR))))
490 {
492 goto done;
493 }
494 if (!strcmp(clr_version, "v4.0.30319"))
495 dst_len = swprintf(dst_dir, format_v40, asmdir, name, version, token);
496 else
497 dst_len = swprintf(dst_dir, format, asmdir, name, version, token);
498
499 create_full_path(dst_dir);
500
501 hr = assembly_get_path(assembly, &asmpath);
502 if (FAILED(hr))
503 goto done;
504
505 if ((p = wcsrchr(asmpath, '\\')))
506 {
507 filename = p + 1;
508 src_dir = asmpath;
509 src_len = filename - asmpath;
510 }
511 else
512 {
513 filename = asmpath;
514 src_dir = NULL;
515 src_len = 0;
516 }
517 hr = copy_file(src_dir, src_len, dst_dir, dst_len, filename);
518 if (FAILED(hr))
519 goto done;
520
521 for (i = 0; i < count; i++)
522 {
523 hr = copy_file(src_dir, src_len, dst_dir, dst_len, external_files[i]);
524 if (FAILED(hr))
525 break;
526 }
527
528done:
532 heap_free(asmpath);
533 heap_free(dst_dir);
534 for (i = 0; i < count; i++) heap_free(external_files[i]);
535 heap_free(external_files);
538 return hr;
539}
540
541static const IAssemblyCacheVtbl AssemblyCacheVtbl = {
550};
551
552/******************************************************************
553 * CreateAssemblyCache (FUSION.@)
554 */
556{
558
559 TRACE("(%p, %d)\n", ppAsmCache, dwReserved);
560
561 if (!ppAsmCache)
562 return E_INVALIDARG;
563
564 *ppAsmCache = NULL;
565
566 if (!(cache = heap_alloc(sizeof(*cache)))) return E_OUTOFMEMORY;
567
569 cache->ref = 1;
571 if (!cache->lock)
572 {
573 heap_free( cache );
575 }
576 *ppAsmCache = &cache->IAssemblyCache_iface;
577 return S_OK;
578}
579
580/* IAssemblyCacheItem */
581
583{
584 return CONTAINING_RECORD(iface, IAssemblyCacheItemImpl, IAssemblyCacheItem_iface);
585}
586
588 REFIID riid, LPVOID *ppobj)
589{
591
592 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
593
594 *ppobj = NULL;
595
597 IsEqualIID(riid, &IID_IAssemblyCacheItem))
598 {
599 IAssemblyCacheItem_AddRef(iface);
600 *ppobj = &This->IAssemblyCacheItem_iface;
601 return S_OK;
602 }
603
604 WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
605 return E_NOINTERFACE;
606}
607
609{
611 ULONG refCount = InterlockedIncrement(&This->ref);
612
613 TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
614
615 return refCount;
616}
617
619{
621 ULONG refCount = InterlockedDecrement(&This->ref);
622
623 TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
624
625 if (!refCount)
627
628 return refCount;
629}
630
633 LPCWSTR pszStreamName,
634 DWORD dwFormat,
636 IStream **ppIStream,
637 ULARGE_INTEGER *puliMaxSize)
638{
639 FIXME("(%p, %d, %s, %d, %d, %p, %p) stub!\n", iface, dwFlags,
640 debugstr_w(pszStreamName), dwFormat, dwFormatFlags, ppIStream, puliMaxSize);
641
642 return E_NOTIMPL;
643}
644
647 ULONG *pulDisposition)
648{
649 FIXME("(%p, %d, %p) stub!\n", iface, dwFlags, pulDisposition);
650 return E_NOTIMPL;
651}
652
654{
655 FIXME("(%p) stub!\n", iface);
656 return E_NOTIMPL;
657}
658
659static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl = {
666};
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
unsigned int dir
Definition: maze.c:112
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define COR_E_ASSEMBLYEXPECTED
Definition: corerror.h:52
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define wcsrchr
Definition: compat.h:16
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define ERROR_INVALID_NAME
Definition: compat.h:103
#define lstrlenW
Definition: compat.h:750
static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface, REFIID riid, LPVOID *ppobj)
Definition: asmcache.c:162
static BOOL create_full_path(LPCWSTR path)
Definition: asmcache.c:62
static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, ASSEMBLY_INFO *pAsmInfo)
Definition: asmcache.c:301
static const WCHAR cache_mutex_nameW[]
Definition: asmcache.c:59
static ULONG WINAPI IAssemblyCacheItemImpl_Release(IAssemblyCacheItem *iface)
Definition: asmcache.c:618
static ULONG WINAPI IAssemblyCacheImpl_AddRef(IAssemblyCache *iface)
Definition: asmcache.c:183
static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *iface, REFIID riid, LPVOID *ppobj)
Definition: asmcache.c:587
static void cache_lock(IAssemblyCacheImpl *cache)
Definition: asmcache.c:208
static void cache_unlock(IAssemblyCacheImpl *cache)
Definition: asmcache.c:213
static ULONG WINAPI IAssemblyCacheItemImpl_AddRef(IAssemblyCacheItem *iface)
Definition: asmcache.c:608
static IAssemblyCacheImpl * impl_from_IAssemblyCache(IAssemblyCache *iface)
Definition: asmcache.c:157
static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
Definition: asmcache.c:110
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface, DWORD dwFlags, PVOID pvReserved, IAssemblyCacheItem **ppAsmItem, LPCWSTR pszAssemblyName)
Definition: asmcache.c:362
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface, IUnknown **ppUnkReserved)
Definition: asmcache.c:387
static HRESULT WINAPI IAssemblyCacheItemImpl_CreateStream(IAssemblyCacheItem *iface, DWORD dwFlags, LPCWSTR pszStreamName, DWORD dwFormat, DWORD dwFormatFlags, IStream **ppIStream, ULARGE_INTEGER *puliMaxSize)
Definition: asmcache.c:631
static HRESULT WINAPI IAssemblyCacheItemImpl_AbortItem(IAssemblyCacheItem *iface)
Definition: asmcache.c:653
HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved)
Definition: asmcache.c:555
static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszManifestFilePath, LPCFUSION_INSTALL_REFERENCE pRefData)
Definition: asmcache.c:420
static ULONG WINAPI IAssemblyCacheImpl_Release(IAssemblyCache *iface)
Definition: asmcache.c:193
static HRESULT WINAPI IAssemblyCacheItemImpl_Commit(IAssemblyCacheItem *iface, DWORD dwFlags, ULONG *pulDisposition)
Definition: asmcache.c:645
static HRESULT copy_file(const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len, const WCHAR *filename)
Definition: asmcache.c:394
static const IAssemblyCacheVtbl AssemblyCacheVtbl
Definition: asmcache.c:541
static IAssemblyCacheItemImpl * impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
Definition: asmcache.c:582
static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, LPCFUSION_INSTALL_REFERENCE pRefData, ULONG *pulDisposition)
Definition: asmcache.c:218
static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl
Definition: asmcache.c:360
HRESULT WINAPI CreateAssemblyEnum(IAssemblyEnum **pEnum, IUnknown *pUnkReserved, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmenum.c:468
static const WCHAR version[]
Definition: asmname.c:66
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmname.c:797
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
Definition: asmname.c:534
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4262
#define ASSEMBLYINFO_FLAG_INSTALLED
Definition: fusion.idl:103
#define swprintf
Definition: precomp.h:40
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
Definition: assembly.c:723
HRESULT assembly_release(ASSEMBLY *assembly)
Definition: assembly.c:694
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path)
Definition: assembly.c:750
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token)
Definition: assembly.c:807
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
Definition: assembly.c:762
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
Definition: assembly.c:865
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file)
Definition: assembly.c:641
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count)
Definition: assembly.c:871
PEKIND assembly_get_architecture(ASSEMBLY *assembly)
Definition: assembly.c:788
@ ASM_CACHE_GAC
Definition: fusion.idl:29
PEKIND
Definition: fusion.idl:36
@ peMSIL
Definition: fusion.idl:38
@ peI386
Definition: fusion.idl:39
@ peNone
Definition: fusion.idl:37
@ peAMD64
Definition: fusion.idl:41
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
const char * filename
Definition: ioapi.h:137
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
static ATOM item
Definition: dde.c:856
clr_version
Definition: msipriv.h:374
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
static unsigned __int64 next
Definition: rand_nt.c:6
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
IAssemblyCache IAssemblyCache_iface
Definition: asmcache.c:47
IAssemblyCacheItem IAssemblyCacheItem_iface
Definition: asmcache.c:54
ULONG cbAssemblyInfo
Definition: winsxs.idl:37
ULONG cchBuf
Definition: winsxs.idl:41
LPWSTR pszCurrentAssemblyPathBuf
Definition: winsxs.idl:40
DWORD dwAssemblyFlags
Definition: winsxs.idl:38
Definition: cache.c:49
IAssemblyCache IAssemblyCache_iface
Definition: cache.c:50
HANDLE lock
Definition: cache.c:52
Definition: format.c:58
Definition: name.c:39
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:576
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
Definition: synch.c:618
DWORD dwFormatFlags
Definition: trayclock.cpp:31
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
@ CANOF_PARSE_DISPLAY_NAME
Definition: winsxs.idl:193
struct _ASSEMBLY_INFO ASSEMBLY_INFO
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185