ReactOS  0.4.14-dev-98-gb0d4763
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 48 of file fusion.c.

49 {
50  FIXME("stub!\n");
51  return E_NOTIMPL;
52 }
#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 553 of file asmcache.c.

554 {
556 
557  TRACE("(%p, %d)\n", ppAsmCache, dwReserved);
558 
559  if (!ppAsmCache)
560  return E_INVALIDARG;
561 
562  *ppAsmCache = NULL;
563 
564  if (!(cache = heap_alloc(sizeof(*cache)))) return E_OUTOFMEMORY;
565 
567  cache->ref = 1;
569  if (!cache->lock)
570  {
571  heap_free( cache );
572  return HRESULT_FROM_WIN32( GetLastError() );
573  }
574  *ppAsmCache = &cache->IAssemblyCache_iface;
575  return S_OK;
576 }
Definition: cache.c:46
#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:50
#define TRACE(s)
Definition: solgame.cpp:4
static const IAssemblyCacheVtbl AssemblyCacheVtbl
Definition: asmcache.c:539
static IOleCache * cache
Definition: ole2.c:75
IAssemblyCache IAssemblyCache_iface
Definition: cache.c:48
#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:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ CreateAssemblyEnum()

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

Definition at line 464 of file asmenum.c.

466 {
467  IAssemblyEnumImpl *asmenum;
468  HRESULT hr;
469 
470  TRACE("(%p, %p, %p, %08x, %p)\n", pEnum, pUnkReserved,
472 
473  if (!pEnum)
474  return E_INVALIDARG;
475 
476  if (dwFlags == 0 || dwFlags == ASM_CACHE_ROOT)
477  return E_INVALIDARG;
478 
479  if (!(asmenum = heap_alloc(sizeof(*asmenum)))) return E_OUTOFMEMORY;
480 
481  asmenum->IAssemblyEnum_iface.lpVtbl = &AssemblyEnumVtbl;
482  asmenum->ref = 1;
483  list_init(&asmenum->assemblies);
484 
485  if (dwFlags & ASM_CACHE_GAC)
486  {
487  hr = enumerate_gac(asmenum, pName);
488  if (FAILED(hr))
489  {
490  heap_free(asmenum);
491  return hr;
492  }
493  }
494 
495  asmenum->iter = list_head(&asmenum->assemblies);
496  *pEnum = &asmenum->IAssemblyEnum_iface;
497 
498  return S_OK;
499 }
static const IAssemblyEnumVtbl AssemblyEnumVtbl
Definition: asmenum.c:160
HRESULT hr
Definition: shlfolder.c:183
static IUnknown IAssemblyName * pName
Definition: asmenum.c:33
IAssemblyEnum IAssemblyEnum_iface
Definition: asmenum.c:50
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:394
#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:53
struct list assemblies
Definition: asmenum.c:52
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 366 of file name.c.

371 {
372  struct name *name;
373  HRESULT hr;
374 
375  TRACE("%p, %s, 0x%08x, %p\n", obj, debugstr_w(assembly), flags, reserved);
376 
377  if (!obj) return E_INVALIDARG;
378 
379  *obj = NULL;
381  return E_INVALIDARG;
382 
383  if (!(name = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*name) )))
384  return E_OUTOFMEMORY;
385 
387  name->refs = 1;
388 
390  if (hr != S_OK)
391  {
392  HeapFree( GetProcessHeap(), 0, name->name );
393  HeapFree( GetProcessHeap(), 0, name->arch );
394  HeapFree( GetProcessHeap(), 0, name->token );
395  HeapFree( GetProcessHeap(), 0, name->type );
397  HeapFree( GetProcessHeap(), 0, name );
398  return hr;
399  }
401  return S_OK;
402 }
WCHAR * token
Definition: name.c:42
WCHAR * version
Definition: name.c:44
HRESULT hr
Definition: shlfolder.c:183
IAssemblyName IAssemblyName_iface
Definition: name.c:38
WCHAR * type
Definition: name.c:43
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:2893
#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:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
LONG refs
Definition: name.c:39
WCHAR * arch
Definition: name.c:41
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:59
static const IAssemblyNameVtbl name_vtbl
Definition: name.c:281
static HRESULT parse_displayname(struct name *name, const WCHAR *displayname)
Definition: name.c:313
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: name.c:36
#define HeapFree(x, y, z)
Definition: compat.h:394
WCHAR * name
Definition: name.c:40

◆ CreateInstallReferenceEnum()

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

Definition at line 66 of file fusion.c.

69 {
70  FIXME("(%p, %p, %08x, %p) stub!\n", ppRefEnum, pName, dwFlags, pvReserved);
71  return E_NOTIMPL;
72 }
#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 109 of file fusion.c.

111 {
112  static const WCHAR assembly[] = {'\\','a','s','s','e','m','b','l','y',0};
113  static const WCHAR gac[] = {'\\','G','A','C',0};
114  static const WCHAR nativeimg[] = {'N','a','t','i','v','e','I','m','a','g','e','s','_',0};
115  static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T',0};
116 #ifdef _WIN64
117  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','6','4',0};
118 #else
119  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','3','2',0};
120 #endif
122  DWORD len;
123  HRESULT hr = S_OK;
124 
125  TRACE("(%08x, %p, %p)\n", dwCacheFlags, pwzCachePath, pcchPath);
126 
127  if (!pcchPath)
128  return E_INVALIDARG;
129 
130  len = GetWindowsDirectoryW(windir, MAX_PATH);
131  strcpyW(path, windir);
132 
133  switch (dwCacheFlags)
134  {
135  case ASM_CACHE_ZAP:
136  {
138  if (FAILED(hr))
139  return hr;
140 
141  len = sprintfW(path, zapfmt, windir, assembly + 1, nativeimg, version);
142  break;
143  }
144  case ASM_CACHE_GAC:
145  {
146  strcpyW(path + len, assembly);
147  len += ARRAY_SIZE(assembly) - 1;
148  strcpyW(path + len, gac);
149  len += ARRAY_SIZE(gac) - 1;
150  break;
151  }
152  case ASM_CACHE_DOWNLOAD:
153  {
154  FIXME("Download cache not implemented\n");
155  return E_FAIL;
156  }
157  case ASM_CACHE_ROOT:
158  strcpyW(path + len, assembly);
159  len += ARRAY_SIZE(assembly) - 1;
160  break;
161  case ASM_CACHE_ROOT_EX:
162  strcpyW(path + len, dotnet);
163  len += ARRAY_SIZE(dotnet) - 1;
164  strcpyW(path + len, assembly);
165  len += ARRAY_SIZE(assembly) - 1;
166  break;
167  default:
168  return E_INVALIDARG;
169  }
170 
171  len++;
172  if (*pcchPath <= len || !pwzCachePath)
174  else if (pwzCachePath)
176 
177  *pcchPath = len;
178  return hr;
179 }
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:64
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
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
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define ARRAY_SIZE(a)
Definition: main.h:24
Definition: services.c:325
#define sprintfW
Definition: unicode.h:58
static HRESULT get_corversion(LPWSTR version, DWORD size)
Definition: fusion.c:86

Referenced by enumerate_gac().