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);
int strcmp(const char *String1, const char *String2)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define COR_E_ASSEMBLYEXPECTED
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_NAME
static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface, REFIID riid, LPVOID *ppobj)
static BOOL create_full_path(LPCWSTR path)
static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, ASSEMBLY_INFO *pAsmInfo)
static const WCHAR cache_mutex_nameW[]
static ULONG WINAPI IAssemblyCacheItemImpl_Release(IAssemblyCacheItem *iface)
static ULONG WINAPI IAssemblyCacheImpl_AddRef(IAssemblyCache *iface)
static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *iface, REFIID riid, LPVOID *ppobj)
static void cache_lock(IAssemblyCacheImpl *cache)
static void cache_unlock(IAssemblyCacheImpl *cache)
static ULONG WINAPI IAssemblyCacheItemImpl_AddRef(IAssemblyCacheItem *iface)
static IAssemblyCacheImpl * impl_from_IAssemblyCache(IAssemblyCache *iface)
static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, PEKIND architecture)
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface, DWORD dwFlags, PVOID pvReserved, IAssemblyCacheItem **ppAsmItem, LPCWSTR pszAssemblyName)
static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface, IUnknown **ppUnkReserved)
static HRESULT WINAPI IAssemblyCacheItemImpl_CreateStream(IAssemblyCacheItem *iface, DWORD dwFlags, LPCWSTR pszStreamName, DWORD dwFormat, DWORD dwFormatFlags, IStream **ppIStream, ULARGE_INTEGER *puliMaxSize)
static HRESULT WINAPI IAssemblyCacheItemImpl_AbortItem(IAssemblyCacheItem *iface)
HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved)
static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszManifestFilePath, LPCFUSION_INSTALL_REFERENCE pRefData)
static ULONG WINAPI IAssemblyCacheImpl_Release(IAssemblyCache *iface)
static HRESULT WINAPI IAssemblyCacheItemImpl_Commit(IAssemblyCacheItem *iface, DWORD dwFlags, ULONG *pulDisposition)
static HRESULT copy_file(const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_dir, DWORD dst_len, const WCHAR *filename)
static const IAssemblyCacheVtbl AssemblyCacheVtbl
static IAssemblyCacheItemImpl * impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface)
static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface, DWORD dwFlags, LPCWSTR pszAssemblyName, LPCFUSION_INSTALL_REFERENCE pRefData, ULONG *pulDisposition)
static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl
static const WCHAR version[]
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
#define ASSEMBLYINFO_FLAG_INSTALLED
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
HRESULT assembly_release(ASSEMBLY *assembly)
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path)
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token)
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file)
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count)
PEKIND assembly_get_architecture(ASSEMBLY *assembly)
GLuint GLuint GLsizei count
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
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
#define memcpy(s1, s2, n)
#define ERROR_ALREADY_EXISTS
#define ERROR_FILE_NOT_FOUND
static LPCSTR DWORD void * pvReserved
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define IsEqualIID(riid1, riid2)
static unsigned __int64 next
IAssemblyCache IAssemblyCache_iface
IAssemblyCacheItem IAssemblyCacheItem_iface
LPWSTR pszCurrentAssemblyPathBuf
IAssemblyCache IAssemblyCache_iface
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
#define CONTAINING_RECORD(address, type, field)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_PATH_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
@ CANOF_PARSE_DISPLAY_NAME
struct _ASSEMBLY_INFO ASSEMBLY_INFO