26 #define WIN32_NO_STATUS 60 {
'_',
'_',
'W',
'I',
'N',
'E',
'_',
'F',
'U',
'S',
'I',
'O',
'N',
'_',
'C',
'A',
'C',
'H',
'E',
'_',
'M',
'U',
'T',
'E',
'X',
'_',
'_',0};
73 new_path[
len - 1] = 0;
89 if(!(slash =
wcsrchr(new_path,
'\\')))
95 len = slash - new_path;
103 new_path[
len] =
'\\';
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};
131 switch (architecture)
149 WARN(
"unhandled architecture %u\n", architecture);
174 IAssemblyCache_AddRef(iface);
175 *ppobj = &
This->IAssemblyCache_iface;
188 TRACE(
"(%p)->(ref before = %u)\n",
This, refCount - 1);
198 TRACE(
"(%p)->(ref before = %u)\n",
cache, refCount + 1);
222 ULONG *pulDisposition)
233 debugstr_w(pszAssemblyName), pRefData, pulDisposition);
237 FIXME(
"application reference not supported\n");
250 hr = IAssemblyEnum_GetNextAssembly( asmenum,
NULL, &
next, 0 );
254 *pulDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
282 disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED;
287 disp = IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED;
290 if (pulDisposition) *pulDisposition =
disp;
293 IAssemblyName_Release( asmname );
294 if (
next) IAssemblyName_Release(
next );
295 if (asmenum) IAssemblyEnum_Release( asmenum );
335 hr = IAssemblyEnum_GetNextAssembly(asmenum,
NULL, &
next, 0);
341 hr = IAssemblyName_IsEqual(asmname,
next, ASM_CMPF_IL_ALL);
353 IAssemblyName_Release(asmname);
354 if (
next) IAssemblyName_Release(
next);
355 if (asmenum) IAssemblyEnum_Release(asmenum);
383 *ppAsmItem = &
item->IAssemblyCacheItem_iface;
390 FIXME(
"(%p, %p) stub!\n", iface, ppUnkReserved);
397 WCHAR *src_file, *dst_file;
403 memcpy( src_file, src_dir, src_len *
sizeof(
WCHAR) );
411 memcpy( dst_file, dst_dir, dst_len *
sizeof(
WCHAR) );
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};
444 if (!pszManifestFilePath || !*pszManifestFilePath)
447 if (!(extension =
wcsrchr(pszManifestFilePath,
'.')))
523 hr =
copy_file(src_dir, src_len, dst_dir, dst_len, external_files[
i]);
599 IAssemblyCacheItem_AddRef(iface);
600 *ppobj = &
This->IAssemblyCacheItem_iface;
613 TRACE(
"(%p)->(ref before = %u)\n",
This, refCount - 1);
623 TRACE(
"(%p)->(ref before = %u)\n",
This, refCount + 1);
639 FIXME(
"(%p, %d, %s, %d, %d, %p, %p) stub!\n", iface,
dwFlags,
647 ULONG *pulDisposition)
649 FIXME(
"(%p, %d, %p) stub!\n", iface,
dwFlags, pulDisposition);
655 FIXME(
"(%p) stub!\n", iface);
WINE_DEFAULT_DEBUG_CHANNEL(fusion)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token)
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path)
static ULONG WINAPI IAssemblyCacheItemImpl_Release(IAssemblyCacheItem *iface)
#define HRESULT_FROM_WIN32(x)
static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, LPCFUSION_INSTALL_REFERENCE pRefData, ULONG *pulDisposition)
#define ASSEMBLYINFO_FLAG_INSTALLED
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface, DWORD dwFlags, PVOID pvReserved, IAssemblyCacheItem **ppAsmItem, LPCWSTR pszAssemblyName)
static ULONG WINAPI IAssemblyCacheImpl_Release(IAssemblyCache *iface)
static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
GLuint GLuint GLsizei count
static void cache_unlock(IAssemblyCacheImpl *cache)
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
static BOOL create_full_path(LPCWSTR path)
DWORD WINAPI GetLastError(VOID)
PEKIND assembly_get_architecture(ASSEMBLY *assembly)
static struct _tagASSEMBLY assembly
static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, ASSEMBLY_INFO *pAsmInfo)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static void * heap_alloc(size_t len)
IAssemblyCache IAssemblyCache_iface
static ULONG WINAPI IAssemblyCacheItemImpl_AddRef(IAssemblyCacheItem *iface)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
static HRESULT WINAPI IAssemblyCacheItemImpl_AbortItem(IAssemblyCacheItem *iface)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
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
static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *iface, REFIID riid, LPVOID *ppobj)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
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
static void cache_lock(IAssemblyCacheImpl *cache)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
struct _ASSEMBLY_INFO ASSEMBLY_INFO
static const WCHAR version[]
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(_In_z_ const wchar_t *_Str, _In_ wchar_t _Ch)
static IAssemblyCacheImpl * impl_from_IAssemblyCache(IAssemblyCache *iface)
#define ERROR_FILE_NOT_FOUND
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static HRESULT WINAPI IAssemblyCacheItemImpl_CreateStream(IAssemblyCacheItem *iface, DWORD dwFlags, LPCWSTR pszStreamName, DWORD dwFormat, DWORD dwFormatFlags, IStream **ppIStream, ULARGE_INTEGER *puliMaxSize)
static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
#define swprintf(buf, format,...)
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszManifestFilePath, LPCFUSION_INSTALL_REFERENCE pRefData)
#define INVALID_FILE_ATTRIBUTES
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file)
#define COR_E_ASSEMBLYEXPECTED
#define InterlockedDecrement
static const IAssemblyCacheVtbl AssemblyCacheVtbl
IAssemblyCacheItem IAssemblyCacheItem_iface
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define memcpy(s1, s2, n)
IAssemblyCache IAssemblyCache_iface
static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface, REFIID riid, LPVOID *ppobj)
HRESULT assembly_release(ASSEMBLY *assembly)
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
static unsigned __int64 next
#define InterlockedIncrement
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
static IAssemblyCacheItemImpl * impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
static LPCWSTR LPVOID pvReserved
static HRESULT copy_file(const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len, const WCHAR *filename)
static ULONG WINAPI IAssemblyCacheImpl_AddRef(IAssemblyCache *iface)
HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved)
int strcmp(const char *String1, const char *String2)
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface, IUnknown **ppUnkReserved)
#define ERROR_INVALID_NAME
LPWSTR pszCurrentAssemblyPathBuf
#define ERROR_PATH_NOT_FOUND
#define ERROR_ALREADY_EXISTS
static HRESULT WINAPI IAssemblyCacheItemImpl_Commit(IAssemblyCacheItem *iface, DWORD dwFlags, ULONG *pulDisposition)
#define IsEqualIID(riid1, riid2)
static const WCHAR cache_mutex_nameW[]
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count)
static BOOL heap_free(void *mem)
#define ERROR_INSUFFICIENT_BUFFER