ReactOS  0.4.14-dev-606-g14ebc0b
fusion.idl File Reference

Go to the source code of this file.

Classes

interface  IAssemblyCache
 
struct  IAssemblyCache::_FUSION_INSTALL_REFERENCE_
 
struct  IAssemblyCache::_ASSEMBLY_INFO
 
interface  IAssemblyCacheItem
 
interface  IAssemblyName
 
interface  IAssemblyEnum
 
interface  IInstallReferenceItem
 
interface  IInstallReferenceEnum
 

Typedefs

typedef enum _tagAssemblyComparisonResult AssemblyComparisonResult
 

Enumerations

enum  ASM_CACHE_FLAGS {
  ASM_CACHE_ZAP = 0x1, ASM_CACHE_GAC = 0x2, ASM_CACHE_DOWNLOAD = 0x4, ASM_CACHE_ROOT = 0x8,
  ASM_CACHE_ROOT_EX = 0x80
}
 
enum  PEKIND {
  peNone = 0x00000000, peMSIL = 0x00000001, peI386 = 0x00000002, peIA64 = 0x00000003,
  peAMD64 = 0x00000004, peARM = 0x00000005, peInvalid = 0xffffffff
}
 
enum  _tagAssemblyComparisonResult {
  ACR_Unknown, ACR_EquivalentFullMatch, ACR_EquivalentWeakNamed, ACR_EquivalentFXUnified,
  ACR_EquivalentUnified, ACR_NonEquivalentVersion, ACR_NonEquivalent, ACR_EquivalentPartialMatch,
  ACR_EquivalentPartialWeakNamed, ACR_EquivalentPartialUnified, ACR_EquivalentPartialFXUnified, ACR_NonEquivalentPartialVersion
}
 

Functions

HRESULT WINAPI ClearDownloadCache (void)
 
HRESULT WINAPI CompareAssemblyIdentity (LPCWSTR, BOOL, LPCWSTR, BOOL, BOOL *, AssemblyComparisonResult *)
 
HRESULT WINAPI CreateAssemblyCache (IAssemblyCache **, DWORD)
 
HRESULT WINAPI CreateAssemblyEnum (IAssemblyEnum **, IUnknown *, IAssemblyName *, DWORD, LPVOID)
 
HRESULT WINAPI CreateAssemblyNameObject (LPASSEMBLYNAME *, LPCWSTR, DWORD, LPVOID)
 
HRESULT WINAPI CreateInstallReferenceEnum (IInstallReferenceEnum **, IAssemblyName *, DWORD, LPVOID)
 
HRESULT WINAPI GetAssemblyIdentityFromFile (LPCWSTR, REFIID, IUnknown **)
 
HRESULT WINAPI GetCachePath (ASM_CACHE_FLAGS, LPWSTR, PDWORD)
 

Typedef Documentation

◆ AssemblyComparisonResult

Enumeration Type Documentation

◆ _tagAssemblyComparisonResult

Enumerator
ACR_Unknown 
ACR_EquivalentFullMatch 
ACR_EquivalentWeakNamed 
ACR_EquivalentFXUnified 
ACR_EquivalentUnified 
ACR_NonEquivalentVersion 
ACR_NonEquivalent 
ACR_EquivalentPartialMatch 
ACR_EquivalentPartialWeakNamed 
ACR_EquivalentPartialUnified 
ACR_EquivalentPartialFXUnified 
ACR_NonEquivalentPartialVersion 

Definition at line 46 of file fusion.idl.

◆ ASM_CACHE_FLAGS

Enumerator
ASM_CACHE_ZAP 
ASM_CACHE_GAC 
ASM_CACHE_DOWNLOAD 
ASM_CACHE_ROOT 
ASM_CACHE_ROOT_EX 

Definition at line 26 of file fusion.idl.

27 {
28  ASM_CACHE_ZAP = 0x1,
29  ASM_CACHE_GAC = 0x2,
30  ASM_CACHE_DOWNLOAD = 0x4,
31  ASM_CACHE_ROOT = 0x8,
32  ASM_CACHE_ROOT_EX = 0x80
ASM_CACHE_FLAGS
Definition: fusion.idl:26

◆ PEKIND

Enumerator
peNone 
peMSIL 
peI386 
peIA64 
peAMD64 
peARM 
peInvalid 

Definition at line 35 of file fusion.idl.

36 {
37  peNone = 0x00000000,
38  peMSIL = 0x00000001,
39  peI386 = 0x00000002,
40  peIA64 = 0x00000003,
41  peAMD64 = 0x00000004,
42  peARM = 0x00000005,
43  peInvalid = 0xffffffff
44 } PEKIND;
Definition: fusion.idl:42
PEKIND
Definition: fusion.idl:35

Function Documentation

◆ ClearDownloadCache()

HRESULT WINAPI ClearDownloadCache ( void  )

Definition at line 50 of file fusion.c.

51 {
52  FIXME("stub!\n");
53  return E_NOTIMPL;
54 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CompareAssemblyIdentity()

HRESULT WINAPI CompareAssemblyIdentity ( LPCWSTR  ,
BOOL  ,
LPCWSTR  ,
BOOL  ,
BOOL ,
AssemblyComparisonResult  
)

◆ CreateAssemblyCache()

HRESULT WINAPI CreateAssemblyCache ( IAssemblyCache **  ,
DWORD   
)

Definition at line 555 of file asmcache.c.

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 );
574  return HRESULT_FROM_WIN32( GetLastError() );
575  }
576  *ppAsmCache = &cache->IAssemblyCache_iface;
577  return S_OK;
578 }
Definition: cache.c:48
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HANDLE lock
Definition: cache.c:52
#define TRACE(s)
Definition: solgame.cpp:4
static const IAssemblyCacheVtbl AssemblyCacheVtbl
Definition: asmcache.c:541
static IOleCache * cache
Definition: ole2.c:75
IAssemblyCache IAssemblyCache_iface
Definition: cache.c:50
#define S_OK
Definition: intsafe.h:59
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:576
static const WCHAR cache_mutex_nameW[]
Definition: asmcache.c:59
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ CreateAssemblyEnum()

HRESULT WINAPI CreateAssemblyEnum ( IAssemblyEnum **  ,
IUnknown ,
IAssemblyName ,
DWORD  ,
LPVOID   
)

Definition at line 468 of file asmenum.c.

470 {
471  IAssemblyEnumImpl *asmenum;
472  HRESULT hr;
473 
474  TRACE("(%p, %p, %p, %08x, %p)\n", pEnum, pUnkReserved,
476 
477  if (!pEnum)
478  return E_INVALIDARG;
479 
480  if (dwFlags == 0 || dwFlags == ASM_CACHE_ROOT)
481  return E_INVALIDARG;
482 
483  if (!(asmenum = heap_alloc(sizeof(*asmenum)))) return E_OUTOFMEMORY;
484 
485  asmenum->IAssemblyEnum_iface.lpVtbl = &AssemblyEnumVtbl;
486  asmenum->ref = 1;
487  list_init(&asmenum->assemblies);
488 
489  if (dwFlags & ASM_CACHE_GAC)
490  {
491  hr = enumerate_gac(asmenum, pName);
492  if (FAILED(hr))
493  {
494  heap_free(asmenum);
495  return hr;
496  }
497  }
498 
499  asmenum->iter = list_head(&asmenum->assemblies);
500  *pEnum = &asmenum->IAssemblyEnum_iface;
501 
502  return S_OK;
503 }
static const IAssemblyEnumVtbl AssemblyEnumVtbl
Definition: asmenum.c:164
HRESULT hr
Definition: shlfolder.c:183
static IUnknown IAssemblyName * pName
Definition: asmenum.c:33
IAssemblyEnum IAssemblyEnum_iface
Definition: asmenum.c:54
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
Definition: asmenum.c:398
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static IUnknown * pUnkReserved
Definition: asmenum.c:33
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static IUnknown IAssemblyName DWORD LPVOID pvReserved
Definition: asmenum.c:33
#define S_OK
Definition: intsafe.h:59
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
struct list * iter
Definition: asmenum.c:57
struct list assemblies
Definition: asmenum.c:56
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by IAssemblyCacheImpl_QueryAssemblyInfo(), and IAssemblyCacheImpl_UninstallAssembly().

◆ CreateAssemblyNameObject()

HRESULT WINAPI CreateAssemblyNameObject ( LPASSEMBLYNAME *  ,
LPCWSTR  ,
DWORD  ,
LPVOID   
)

Definition at line 368 of file name.c.

373 {
374  struct name *name;
375  HRESULT hr;
376 
377  TRACE("%p, %s, 0x%08x, %p\n", obj, debugstr_w(assembly), flags, reserved);
378 
379  if (!obj) return E_INVALIDARG;
380 
381  *obj = NULL;
383  return E_INVALIDARG;
384 
385  if (!(name = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*name) )))
386  return E_OUTOFMEMORY;
387 
389  name->refs = 1;
390 
392  if (hr != S_OK)
393  {
394  HeapFree( GetProcessHeap(), 0, name->name );
395  HeapFree( GetProcessHeap(), 0, name->arch );
396  HeapFree( GetProcessHeap(), 0, name->token );
397  HeapFree( GetProcessHeap(), 0, name->type );
399  HeapFree( GetProcessHeap(), 0, name );
400  return hr;
401  }
403  return S_OK;
404 }
WCHAR * token
Definition: name.c:44
WCHAR * version
Definition: name.c:46
HRESULT hr
Definition: shlfolder.c:183
IAssemblyName IAssemblyName_iface
Definition: name.c:40
WCHAR * type
Definition: name.c:45
LPCSTR name
Definition: name.c:34
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
r reserved
Definition: btrfs.c:2865
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
LONG refs
Definition: name.c:41
WCHAR * arch
Definition: name.c:43
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:59
static const IAssemblyNameVtbl name_vtbl
Definition: name.c:283
static HRESULT parse_displayname(struct name *name, const WCHAR *displayname)
Definition: name.c:315
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: name.c:38
#define HeapFree(x, y, z)
Definition: compat.h:402
WCHAR * name
Definition: name.c:42

◆ CreateInstallReferenceEnum()

HRESULT WINAPI CreateInstallReferenceEnum ( IInstallReferenceEnum **  ,
IAssemblyName ,
DWORD  ,
LPVOID   
)

Definition at line 68 of file fusion.c.

71 {
72  FIXME("(%p, %p, %08x, %p) stub!\n", ppRefEnum, pName, dwFlags, pvReserved);
73  return E_NOTIMPL;
74 }
#define FIXME(fmt,...)
Definition: debug.h:110
static LPSTR pName
Definition: security.c:75
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99
static LPCWSTR LPVOID pvReserved
Definition: fusion.c:28

◆ GetAssemblyIdentityFromFile()

HRESULT WINAPI GetAssemblyIdentityFromFile ( LPCWSTR  ,
REFIID  ,
IUnknown **   
)

◆ GetCachePath()

HRESULT WINAPI GetCachePath ( ASM_CACHE_FLAGS  ,
LPWSTR  ,
PDWORD   
)

Definition at line 111 of file fusion.c.

113 {
114  static const WCHAR assembly[] = {'\\','a','s','s','e','m','b','l','y',0};
115  static const WCHAR gac[] = {'\\','G','A','C',0};
116  static const WCHAR nativeimg[] = {'N','a','t','i','v','e','I','m','a','g','e','s','_',0};
117  static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T',0};
118 #ifdef _WIN64
119  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','6','4',0};
120 #else
121  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','3','2',0};
122 #endif
124  DWORD len;
125  HRESULT hr = S_OK;
126 
127  TRACE("(%08x, %p, %p)\n", dwCacheFlags, pwzCachePath, pcchPath);
128 
129  if (!pcchPath)
130  return E_INVALIDARG;
131 
132  len = GetWindowsDirectoryW(windir, MAX_PATH);
133  lstrcpyW(path, windir);
134 
135  switch (dwCacheFlags)
136  {
137  case ASM_CACHE_ZAP:
138  {
140  if (FAILED(hr))
141  return hr;
142 
143  len = swprintf(path, zapfmt, windir, assembly + 1, nativeimg, version);
144  break;
145  }
146  case ASM_CACHE_GAC:
147  {
149  len += ARRAY_SIZE(assembly) - 1;
150  lstrcpyW(path + len, gac);
151  len += ARRAY_SIZE(gac) - 1;
152  break;
153  }
154  case ASM_CACHE_DOWNLOAD:
155  {
156  FIXME("Download cache not implemented\n");
157  return E_FAIL;
158  }
159  case ASM_CACHE_ROOT:
161  len += ARRAY_SIZE(assembly) - 1;
162  break;
163  case ASM_CACHE_ROOT_EX:
164  lstrcpyW(path + len, dotnet);
165  len += ARRAY_SIZE(dotnet) - 1;
167  len += ARRAY_SIZE(assembly) - 1;
168  break;
169  default:
170  return E_INVALIDARG;
171  }
172 
173  len++;
174  if (*pcchPath <= len || !pwzCachePath)
176  else if (pwzCachePath)
178 
179  *pcchPath = len;
180  return hr;
181 }
HRESULT hr
Definition: shlfolder.c:183
#define E_FAIL
Definition: ddrawi.h:102
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2351
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR version[]
Definition: asmname.c:66
static LPWSTR pwzCachePath
Definition: fusion.c:27
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
static LPWSTR PDWORD pcchPath
Definition: fusion.c:27
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:414
#define ARRAY_SIZE(a)
Definition: main.h:24
static HRESULT get_corversion(LPWSTR version, DWORD size)
Definition: fusion.c:88

Referenced by enumerate_gac().