64 IAssemblyCache_AddRef( iface );
94 static const WCHAR winsxsW[] =
L"\\winsxs\\";
104 static const WCHAR fmtW[] =
L"%s_%s_%s_%s_none_deadbeef";
140 static const WCHAR fmtW[] =
L"%s_%s_%s_none_deadbeef";
155 static const WCHAR fmtW[] =
L"%spolicies\\%s\\%s.policy";
183#define ASSEMBLYINFO_FLAG_INSTALLED 1
214 IAssemblyName_Release( name_obj );
219 IAssemblyName_Release( name_obj );
240 TRACE(
"assembly is installed\n");
243 if (
info->pszCurrentAssemblyPathBuf)
255 IAssemblyName_Release( name_obj );
287 hr = IXMLDOMNamedNodeMap_getNamedItem(
map,
str, &
attr );
291 hr = IXMLDOMNode_get_nodeValue(
attr, &
var );
292 IXMLDOMNode_Release(
attr );
350 hr = IXMLDOMDocument_getElementsByTagName( doc,
str, &
list );
354 hr = IXMLDOMNodeList_get_length(
list, &
len );
355 if (
hr !=
S_OK)
goto done;
374 hr = IXMLDOMNode_get_attributes(
node, &attrs );
375 IXMLDOMNode_Release(
node );
381 IXMLDOMNamedNodeMap_Release( attrs );
387 IXMLDOMNamedNodeMap_Release( attrs );
399 WARN(
"no files found\n");
404 IXMLDOMNodeList_Release(
list );
419 hr = IXMLDOMDocument_getElementsByTagName( doc,
str, &
list );
421 if (
hr !=
S_OK)
goto done;
423 hr = IXMLDOMNodeList_get_length(
list, &
len );
424 if (
hr !=
S_OK)
goto done;
431 if (
hr !=
S_OK)
goto done;
444 hr = IXMLDOMNode_get_attributes(
node, &attrs );
445 if (
hr !=
S_OK)
goto done;
453 if (!
a->type || (
wcscmp(
a->type,
L"win32" ) &&
wcscmp(
a->type,
L"win32-policy" )) ||
454 !
a->name || !
a->version || !
a->arch || !
a->token)
456 WARN(
"invalid win32 assembly\n");
463 if (attrs) IXMLDOMNamedNodeMap_Release( attrs );
464 if (
node) IXMLDOMNode_Release(
node );
465 if (
list) IXMLDOMNodeList_Release(
list );
474 static const WCHAR policiesW[] =
L"policies\\";
475 static const WCHAR suffixW[] =
L".policy";
517 WARN(
"failed to copy policy manifest file 0x%08lx\n",
hr);
545 static const WCHAR manifestsW[] =
L"manifests\\";
546 static const WCHAR suffixW[] =
L".manifest";
579 hr = IXMLDOMDocument_load( doc,
var, &
b );
584 WARN(
"failed to load manifest\n");
604 TRACE(
"manifest exists, skipping install\n");
613 WARN(
"failed to copy manifest file 0x%08lx\n",
hr);
646 WARN(
"failed to copy file 0x%08lx\n",
hr);
689 if (doc) IXMLDOMDocument_Release( doc );
749 FIXME(
"application reference not supported\n");
793 if (name_obj) IAssemblyName_Release( name_obj );
796 if (doc) IXMLDOMDocument_Release( doc );
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define ERROR_INSUFFICIENT_BUFFER
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
static const WCHAR version[]
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
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)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
static wchar_t * wcslwr(wchar_t *str)
static wchar_t * wcsdup(const wchar_t *str)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
static HRESULT load_manifest(IXMLDOMDocument *doc, const WCHAR *filename)
static HRESULT WINAPI cache_UninstallAssembly(IAssemblyCache *iface, DWORD flags, LPCWSTR assembly_name, LPCFUSION_INSTALL_REFERENCE ref, ULONG *disp)
static void cache_unlock(struct cache *cache)
static const IAssemblyCacheVtbl cache_vtbl
static ULONG WINAPI cache_AddRef(IAssemblyCache *iface)
static HRESULT uninstall_assembly(struct assembly *assembly)
static HRESULT install_assembly(const WCHAR *manifest, struct assembly *assembly)
static const WCHAR cache_mutex_nameW[]
HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **obj, DWORD reserved)
static WCHAR * build_policy_path(const WCHAR *arch, const WCHAR *name, const WCHAR *token, const WCHAR *version)
static WCHAR * build_policy_name(const WCHAR *arch, const WCHAR *name, const WCHAR *token, unsigned int *len)
static HRESULT WINAPI cache_QueryInterface(IAssemblyCache *iface, REFIID riid, void **ret_iface)
static WCHAR * build_manifest_filename(const WCHAR *arch, const WCHAR *name, const WCHAR *token, const WCHAR *version)
#define ASSEMBLYINFO_FLAG_INSTALLED
static BSTR get_attribute_value(IXMLDOMNamedNodeMap *map, const WCHAR *value_name)
static HRESULT WINAPI cache_Reserved(IAssemblyCache *iface, IUnknown **reserved)
static HRESULT parse_files(IXMLDOMDocument *doc, struct assembly *assembly)
static struct cache * impl_from_IAssemblyCache(IAssemblyCache *iface)
static unsigned int build_sxs_path(WCHAR *path)
static WCHAR * build_policy_filename(const WCHAR *arch, const WCHAR *name, const WCHAR *token, const WCHAR *version)
static void free_assembly(struct assembly *assembly)
static HRESULT WINAPI cache_CreateAssemblyCacheItem(IAssemblyCache *iface, DWORD flags, PVOID reserved, IAssemblyCacheItem **item, LPCWSTR name)
static HRESULT WINAPI cache_InstallAssembly(IAssemblyCache *iface, DWORD flags, LPCWSTR path, LPCFUSION_INSTALL_REFERENCE ref)
static HRESULT install_policy(const WCHAR *manifest, struct assembly *assembly)
static HRESULT parse_assembly(IXMLDOMDocument *doc, struct assembly **assembly)
static WCHAR * build_source_filename(const WCHAR *manifest, struct file *file)
static HRESULT WINAPI cache_QueryAssemblyInfo(IAssemblyCache *iface, DWORD flags, LPCWSTR assembly_name, ASSEMBLY_INFO *info)
static WCHAR * build_assembly_name(const WCHAR *arch, const WCHAR *name, const WCHAR *token, const WCHAR *version, unsigned int *len)
static ULONG WINAPI cache_Release(IAssemblyCache *iface)
static WCHAR * build_dll_path(const WCHAR *arch, const WCHAR *name, const WCHAR *token, const WCHAR *version)
const WCHAR * get_name_attribute(IAssemblyName *iface, enum name_attr_id id)
static SRWLOCK cache_lock
GLuint GLuint GLsizei GLenum type
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
__cdecl __MINGW_NOTHROW char * dirname(char *)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
const struct _GUID CLSID_DOMDocument
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualIID(riid1, riid2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
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)
static const CHAR manifest[]
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_SXS_MANIFEST_FORMAT_ERROR
#define ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE
#define ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE
@ CANOF_PARSE_DISPLAY_NAME